- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/androidTest/java/com/sharecare/realgreen/ItAccountEdit.kt:3:1Line detected, which is longer than the defined maximum line length in the code style.
1 package com.sharecare.realgreen
2
3 /*
4 @Draft("to-cache", developer = Developer.Etienne)
5 @RunWith(AndroidJUnit4::class)
6 @LargeTest
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/debug/java/com/sharecare/realgreen/FakePushReceiver.kt:17:2Line detected, which is longer than the defined maximum line length in the code style.
14 *
15 * The command for triggering the Receiver looks like:
16 *
17 * adb shell am broadcast -a "fake_push" -p com.sharecare.realgreen --es "title" "Title" --es "body" "Body" --es "link" "https://you.sharecare.com/tracker/steps/enter"
18 */
19 class FakePushReceiver : BroadcastReceiver() {
20 override fun onReceive(context: Context, intent: Intent) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/debug/java/com/sharecare/realgreen/cmd/DebugCmd.kt:65:17Line detected, which is longer than the defined maximum line length in the code style.
62 Register {
63 override val exe: DebugCmdExecutable = { intent: Intent ->
64 backgroundScope().launch {
65 val inputInjection: MutableStateFlow<InjectedInput?> = globalInjection().get(named(GlobalFlowId.InputInjection))
66 val input = InjectedInput(type = "registration", content = mutableMapOf(
67 "country" to intent.getStringExtra("country")!!,
68 "firstname" to intent.getStringExtra("firstname")!!,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/debug/java/com/sharecare/realgreen/cmd/DebugCmd.kt:82:13Line detected, which is longer than the defined maximum line length in the code style.
79 },
80 Version {
81 override val exe: DebugCmdExecutable = { _: Intent ->
82 Toast.makeText(appContext(), "${appContext().getString(R.string.version)} ${BuildConfig.VERSION_NAME} ${BuildConfig.VERSION_CODE}", Toast.LENGTH_SHORT).show()
83 }
84 }
85
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/debug/java/com/sharecare/realgreen/cmd/DebugCmdHandler.kt:15:1Line detected, which is longer than the defined maximum line length in the code style.
12 import org.koin.core.qualifier.named
13
14 @NonProductionCode
15 class DebugCmdHandler(private val cmdFlow:MutableSharedFlow<Pair<DebugCommand,Intent>> = globalInjection().get(named(DebugKoins.DebugCmdFlow))) : Logger by AndroidLogger(enabled = true, tag = "cmd") {
16
17 suspend fun handle(intent: Intent, cmdStr: String) {
18
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/debug/java/com/sharecare/realgreen/cmd/DebugCmdReceiver.kt:36:13Line detected, which is longer than the defined maximum line length in the code style.
33 try {
34 if (intent == null) throw Exception("Receiver requires non-null intents")
35 if (intent.action == null) throw Exception("Non-null action required")
36 if (intent.action!!.toLowerCase(Locale.ROOT) != cmd.toLowerCase(Locale.ROOT)) throw Exception("Action equating $cmd required")
37 if (!intent.hasExtra(extra.toLowerCase(Locale.ROOT))) throw Exception("Extra with id $extra is not provided.")
38 val cmdStr = intent.getStringExtra(extra)!!
39 backgroundScope().launch { handler.handle(intent, cmdStr) }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/debug/java/com/sharecare/realgreen/cmd/DebugCmdReceiver.kt:37:13Line detected, which is longer than the defined maximum line length in the code style.
34 if (intent == null) throw Exception("Receiver requires non-null intents")
35 if (intent.action == null) throw Exception("Non-null action required")
36 if (intent.action!!.toLowerCase(Locale.ROOT) != cmd.toLowerCase(Locale.ROOT)) throw Exception("Action equating $cmd required")
37 if (!intent.hasExtra(extra.toLowerCase(Locale.ROOT))) throw Exception("Extra with id $extra is not provided.")
38 val cmdStr = intent.getStringExtra(extra)!!
39 backgroundScope().launch { handler.handle(intent, cmdStr) }
40 } catch (e: Exception) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/debug/java/com/sharecare/realgreen/di/DebugModule.kt:15:2Line detected, which is longer than the defined maximum line length in the code style.
12 import org.koin.dsl.module
13
14 /**
15 * Hint: refactoring package structure and/or naming requires manual checkup in [com.sharecare.realgreen.di.koin.modules.allModules]
16 */
17 @NonProductionCode
18 fun debugModule() = module{
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/debug/java/com/sharecare/realgreen/mocks/MiscSettingsMocks.kt:9:5Line detected, which is longer than the defined maximum line length in the code style.
6 onboardingUrl = "https://www.sharecare.com/",
7 sponsorLogo = null,
8 sponsorId = "Mock",
9 text = "Connect the many pieces and people that impact your health with one app. After this past year, your physical and mental health has never been more important. Sharecare wants to help you live healthy and stay resilient with FREE access to award-winning programs that work.",
10 title = "Sponsor Inc",
11 logoHeight = 500,
12 logoWidth = 500
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/debug/java/com/sharecare/realgreen/repositories/DebugAdvocate.kt:14:13Line detected, which is longer than the defined maximum line length in the code style.
11 advocateName = "Norman A.",
12 advocateType = AdvocateType.SPECIFIC,
13 advocatePhone = "0014 048 004 4",
14 advocateBio = "I'm normal, online & mutable. As advocate having an Aries sun sign means that you are aware of yourself and respect individuality.",
15 advocateLocationTimezone = "Geneva (UTC)",
16 advocateAvatarUrl = "https://res.cloudinary.com/sharecare/image/upload/v1598366317/sharecare-icons/cards/input_resultSide_hero.png",
17 canBeChanged = true
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/debug/java/com/sharecare/realgreen/repositories/DebugAdvocate.kt:16:13Line detected, which is longer than the defined maximum line length in the code style.
13 advocatePhone = "0014 048 004 4",
14 advocateBio = "I'm normal, online & mutable. As advocate having an Aries sun sign means that you are aware of yourself and respect individuality.",
15 advocateLocationTimezone = "Geneva (UTC)",
16 advocateAvatarUrl = "https://res.cloudinary.com/sharecare/image/upload/v1598366317/sharecare-icons/cards/input_resultSide_hero.png",
17 canBeChanged = true
18 )
19 },
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/debug/java/com/sharecare/realgreen/repositories/DebugAdvocate.kt:26:13Line detected, which is longer than the defined maximum line length in the code style.
23 advocateName = "Omar A.",
24 advocateType = AdvocateType.SPECIFIC,
25 advocatePhone = "0014 048 004 4",
26 advocateBio = "I'm normal, offline & mutable. As advocate having an Aries sun sign means that you are aware of yourself and respect individuality.",
27 advocateLocationTimezone = "Basel (UTC)",
28 advocateAvatarUrl = "https://res.cloudinary.com/sharecare/image/upload/v1598366317/sharecare-icons/cards/input_resultSide_hero.png",
29 canBeChanged = true
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/debug/java/com/sharecare/realgreen/repositories/DebugAdvocate.kt:28:13Line detected, which is longer than the defined maximum line length in the code style.
25 advocatePhone = "0014 048 004 4",
26 advocateBio = "I'm normal, offline & mutable. As advocate having an Aries sun sign means that you are aware of yourself and respect individuality.",
27 advocateLocationTimezone = "Basel (UTC)",
28 advocateAvatarUrl = "https://res.cloudinary.com/sharecare/image/upload/v1598366317/sharecare-icons/cards/input_resultSide_hero.png",
29 canBeChanged = true
30 )
31 },
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/debug/java/com/sharecare/realgreen/repositories/DebugTooltipRepository.kt:15:1Line detected, which is longer than the defined maximum line length in the code style.
12 import com.sharecare.realgreen.feed.tooltip.repository.TooltipRepository
13
14
15 class DebugTooltipRepository(private val logs: Logger = AndroidLogger(TOOLTIPS_ENABLE_LOGS, TOOLTIPS_LOG_TAG), val service: TooltipService? = null) : TooltipRepository, Logger by logs {
16
17 private val reportedList = mutableListOf<TooltipTag>()
18
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/debug/java/com/sharecare/realgreen/repositories/DebugTooltipRepository.kt:20:9Line detected, which is longer than the defined maximum line length in the code style.
17 private val reportedList = mutableListOf<TooltipTag>()
18
19 private val dummies = listOf(
20 TooltipItem(TooltipTag.HomeNotifications.name , TooltipTag.HomeNotifications, body = "See your latest alerts and messages in the Notification Center."),
21 TooltipItem(TooltipTag.HomeHeader.name, TooltipTag.HomeHeader, body = "Take a moment and breathe with a relaxing scene."),
22 TooltipItem(TooltipTag.HomeHeroTileBenefits.name, TooltipTag.HomeHeroTileBenefits, body = "View all your health benefits here."),
23 TooltipItem(TooltipTag.HomeHeroTileGdt.name, TooltipTag.HomeHeroTileGdt, body = "Here you can enter data for your tracked health factors."),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/debug/java/com/sharecare/realgreen/repositories/DebugTooltipRepository.kt:21:9Line detected, which is longer than the defined maximum line length in the code style.
18
19 private val dummies = listOf(
20 TooltipItem(TooltipTag.HomeNotifications.name , TooltipTag.HomeNotifications, body = "See your latest alerts and messages in the Notification Center."),
21 TooltipItem(TooltipTag.HomeHeader.name, TooltipTag.HomeHeader, body = "Take a moment and breathe with a relaxing scene."),
22 TooltipItem(TooltipTag.HomeHeroTileBenefits.name, TooltipTag.HomeHeroTileBenefits, body = "View all your health benefits here."),
23 TooltipItem(TooltipTag.HomeHeroTileGdt.name, TooltipTag.HomeHeroTileGdt, body = "Here you can enter data for your tracked health factors."),
24 TooltipItem(TooltipTag.HomeJourneyGroup.name, TooltipTag.HomeJourneyGroup, body = "Daily content personalized to lower your RealAge."),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/debug/java/com/sharecare/realgreen/repositories/DebugTooltipRepository.kt:22:9Line detected, which is longer than the defined maximum line length in the code style.
19 private val dummies = listOf(
20 TooltipItem(TooltipTag.HomeNotifications.name , TooltipTag.HomeNotifications, body = "See your latest alerts and messages in the Notification Center."),
21 TooltipItem(TooltipTag.HomeHeader.name, TooltipTag.HomeHeader, body = "Take a moment and breathe with a relaxing scene."),
22 TooltipItem(TooltipTag.HomeHeroTileBenefits.name, TooltipTag.HomeHeroTileBenefits, body = "View all your health benefits here."),
23 TooltipItem(TooltipTag.HomeHeroTileGdt.name, TooltipTag.HomeHeroTileGdt, body = "Here you can enter data for your tracked health factors."),
24 TooltipItem(TooltipTag.HomeJourneyGroup.name, TooltipTag.HomeJourneyGroup, body = "Daily content personalized to lower your RealAge."),
25 TooltipItem(TooltipTag.AdvocacyFab.name, TooltipTag.AdvocacyFab, body = "I'm the FAB"),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/debug/java/com/sharecare/realgreen/repositories/DebugTooltipRepository.kt:23:9Line detected, which is longer than the defined maximum line length in the code style.
20 TooltipItem(TooltipTag.HomeNotifications.name , TooltipTag.HomeNotifications, body = "See your latest alerts and messages in the Notification Center."),
21 TooltipItem(TooltipTag.HomeHeader.name, TooltipTag.HomeHeader, body = "Take a moment and breathe with a relaxing scene."),
22 TooltipItem(TooltipTag.HomeHeroTileBenefits.name, TooltipTag.HomeHeroTileBenefits, body = "View all your health benefits here."),
23 TooltipItem(TooltipTag.HomeHeroTileGdt.name, TooltipTag.HomeHeroTileGdt, body = "Here you can enter data for your tracked health factors."),
24 TooltipItem(TooltipTag.HomeJourneyGroup.name, TooltipTag.HomeJourneyGroup, body = "Daily content personalized to lower your RealAge."),
25 TooltipItem(TooltipTag.AdvocacyFab.name, TooltipTag.AdvocacyFab, body = "I'm the FAB"),
26
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/debug/java/com/sharecare/realgreen/repositories/DebugTooltipRepository.kt:24:9Line detected, which is longer than the defined maximum line length in the code style.
21 TooltipItem(TooltipTag.HomeHeader.name, TooltipTag.HomeHeader, body = "Take a moment and breathe with a relaxing scene."),
22 TooltipItem(TooltipTag.HomeHeroTileBenefits.name, TooltipTag.HomeHeroTileBenefits, body = "View all your health benefits here."),
23 TooltipItem(TooltipTag.HomeHeroTileGdt.name, TooltipTag.HomeHeroTileGdt, body = "Here you can enter data for your tracked health factors."),
24 TooltipItem(TooltipTag.HomeJourneyGroup.name, TooltipTag.HomeJourneyGroup, body = "Daily content personalized to lower your RealAge."),
25 TooltipItem(TooltipTag.AdvocacyFab.name, TooltipTag.AdvocacyFab, body = "I'm the FAB"),
26
27 )
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/debug/java/com/sharecare/realgreen/repositories/DebugTooltipRepository.kt:29:5Line detected, which is longer than the defined maximum line length in the code style.
26
27 )
28
29 override suspend fun reportEngaged(viewedItems: List<TooltipItem>, skippedItems: List<TooltipItem>, confirm:Boolean): Int {
30 (viewedItems+skippedItems).forEach {
31 i("Reported tooltip ${it.reference}")
32 if (!reportedList.contains(it.reference)) reportedList.add(it.reference) else throw RuntimeException("Already reported")
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/debug/java/com/sharecare/realgreen/repositories/DebugTooltipRepository.kt:32:13Line detected, which is longer than the defined maximum line length in the code style.
29 override suspend fun reportEngaged(viewedItems: List<TooltipItem>, skippedItems: List<TooltipItem>, confirm:Boolean): Int {
30 (viewedItems+skippedItems).forEach {
31 i("Reported tooltip ${it.reference}")
32 if (!reportedList.contains(it.reference)) reportedList.add(it.reference) else throw RuntimeException("Already reported")
33 }
34 return reportedList.size
35 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/debug/java/com/sharecare/realgreen/repositories/DebugTooltipRepository.kt:41:9Line detected, which is longer than the defined maximum line length in the code style.
38 candidates.forEach {
39 i("Tooltip candidate $it")
40 }
41 val results: List<TooltipItem> = this.dummies.filter { !reportedList.contains(it.reference) && candidates.contains(it.reference) }
42 results.forEach {
43 i("Repository result ${it.reference}")
44 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/dev/java/com/sharecare/realgreen/ui/DevHostActivity.kt:17:1Line detected, which is longer than the defined maximum line length in the code style.
14 import org.koin.core.scope.Scope
15
16 @NonProductionCode
17 class DevHostActivity(val navigator: RootNavigator = RootNavigator::class.inject()) : AppCompatActivity(R.layout.dev_host_activity), NavHostApi {
18
19 override val navController: NavController by lazy { ((supportFragmentManager.findFragmentById(R.id.dev_host_fragment) as NavHostFragment).navController) }
20
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/dev/java/com/sharecare/realgreen/ui/DevHostActivity.kt:19:5Line detected, which is longer than the defined maximum line length in the code style.
16 @NonProductionCode
17 class DevHostActivity(val navigator: RootNavigator = RootNavigator::class.inject()) : AppCompatActivity(R.layout.dev_host_activity), NavHostApi {
18
19 override val navController: NavController by lazy { ((supportFragmentManager.findFragmentById(R.id.dev_host_fragment) as NavHostFragment).navController) }
20
21 override fun onCreate(savedInstanceState: Bundle?) {
22 super.onCreate(savedInstanceState)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/dev/java/com/sharecare/realgreen/ui/home/DevHomeAdapter.kt:9:1Line detected, which is longer than the defined maximum line length in the code style.
6 import com.sharecare.realgreen.core.tool.annotations.NonProductionCode
7
8 @NonProductionCode
9 class DevHomeAdapter(context:Context):ArrayAdapter<DevHomeButton>(context, R.layout.item_legal, R.id.title, DevHomeButton.values())
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/DailyCheckInAdapter.kt:16:9Line detected, which is longer than the defined maximum line length in the code style.
13
14 override fun onCreateActualViewHolder(parent: ViewGroup, viewType: Int): ChapterViewholder {
15 val inflater = LayoutInflater.from(parent.context)
16 val binding = DataBindingUtil.inflate<ItemChapterSectionBinding>(inflater, R.layout.item_chapter_section, parent, false)
17 return ChapterViewholder(binding)
18 }
19 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/PHRBiometricsListAdapter.kt:13:1Line detected, which is longer than the defined maximum line length in the code style.
10 import com.sharecare.realgreen.presenter.phr.healthprofile.HPBiometricsSection
11
12
13 class PHRBiometricsListAdapter(private val isHistoryMode: Boolean): TrashableHeaderFooterListAdapter<HPBiometricsSection,
14 TrashableBindableViewHolder<HPBiometricsSection>>(emptyList()) {
15
16 override fun onCreateActualViewHolder(parent: ViewGroup, viewType: Int) = if (viewType == TYPE_SUBTITLE) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/PHRDetailAdapter.kt:68:13Line detected, which is longer than the defined maximum line length in the code style.
65 onDelete(holder, position)
66
67 }
68 TYPE_EMPTY_STATE -> (holder as PHREmptyStateItemHolder).onBind(flatList!![position].second as HealthCategory)
69 }
70 }
71
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/PHRDetailAdapter.kt:85:17Line detected, which is longer than the defined maximum line length in the code style.
82 if (header != null) flatList!!.add(Pair(TYPE_HEADER, "Header"))
83 if (HealthCategory.BIOMETRICS.name != categoryTypeName || editPage) {
84 for (section in sections!!) {
85 if ((!codes!!.contains(section.code) || editPage) && (HealthCategory.CARE_TEAMS.name != categoryTypeName)) {
86 codes!!.add(section.code!!)
87 if (HealthCategory.LAB_TESTS.equals(categoryTypeName?.let {
88 HealthCategory[it]
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/healthwallet/HealthWalletFieldsAdapter.kt:47:13Line detected, which is longer than the defined maximum line length in the code style.
44
45 HealthWalletFieldQRCodeViewHolder(walletImageProvider, binding)
46 } else {
47 val binding = DataBindingUtil.inflate<ItemHealthWalletFieldBinding>(inflater, R.layout.item_health_wallet_field, parent, false)
48 HealthWalletFieldViewHolder(binding)
49 }
50 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/realage/RealAgeAdapter.kt:22:9Line detected, which is longer than the defined maximum line length in the code style.
19
20 override fun onCreateActualViewHolder(parent: ViewGroup, viewType: Int): RealAgeViewHolder {
21 val inflater = LayoutInflater.from(parent.context)
22 val binding = DataBindingUtil.inflate<ItemRealAgeCategoryBinding>(inflater, R.layout.item_real_age_category, parent, false)
23 return RealAgeViewHolder(binding)
24 }
25 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/realage/RealAgeAdapter.kt:27:1Line detected, which is longer than the defined maximum line length in the code style.
24 }
25 }
26
27 class RealAgeViewHolder(private val binding: ItemRealAgeCategoryBinding) : BindableViewHolder<RealAgeReportItem>(binding.root) {
28
29 override fun onBind(item: RealAgeReportItem) {
30 binding.realAgeTitleItem.setText(item.title)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/CardViewHolderFactory.kt:45:13Line detected, which is longer than the defined maximum line length in the code style.
42 ItemType.REPORT_DAILY_STEPS -> DailyStepsViewHolder(inflatedView)
43 ItemType.REPORT_ALL_TIME_TOP_INFLUENCER -> AllTimeTopInfluencerViewHolder(inflatedView)
44 ItemType.REPORT_STRESS_BY_GENDER -> WeeklyStressByGenderViewHolder(inflatedView)
45 ItemType.REPORT_MOST_STRESSED_DAY_OF_WEEK_HISTORICAL -> WeeklyMostStressedDayHistoricalViewHolder(inflatedView)
46 ItemType.REPORT_STRESS_CHANGE_WEEK_OVER_WEEK -> StressIntensityByWeekViewHolder(inflatedView)
47 ItemType.ANNOUNCEMENT -> AnnouncementViewHolder(inflatedView)
48 ItemType.RECOMMENDED_TOPICS -> RecommendedTopicsViewHolder(DataBindingUtil.inflate(inflater, layoutRes, root, false))
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/CardViewHolderFactory.kt:48:13Line detected, which is longer than the defined maximum line length in the code style.
45 ItemType.REPORT_MOST_STRESSED_DAY_OF_WEEK_HISTORICAL -> WeeklyMostStressedDayHistoricalViewHolder(inflatedView)
46 ItemType.REPORT_STRESS_CHANGE_WEEK_OVER_WEEK -> StressIntensityByWeekViewHolder(inflatedView)
47 ItemType.ANNOUNCEMENT -> AnnouncementViewHolder(inflatedView)
48 ItemType.RECOMMENDED_TOPICS -> RecommendedTopicsViewHolder(DataBindingUtil.inflate(inflater, layoutRes, root, false))
49 ItemType.GD_SUBSCRIPTION_STATUS -> GreendayMilestoneViewHolder(inflatedView)
50 ItemType.LINK -> LinkViewHolder(inflatedView)
51 ItemType.IW_REPORT -> InsightWizardReportViewHolder(inflatedView)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/CardViewHolderFactory.kt:97:9Line detected, which is longer than the defined maximum line length in the code style.
94 ItemType.REPORT_DAILY_STEPS -> R.layout.card_daily_steps_grouped
95 ItemType.REPORT_ALL_TIME_TOP_INFLUENCER -> R.layout.card_all_time_influencer_grouped
96 ItemType.REPORT_STRESS_BY_GENDER -> R.layout.card_weekly_stress_by_gender_grouped
97 ItemType.REPORT_MOST_STRESSED_DAY_OF_WEEK_HISTORICAL -> R.layout.card_weekly_most_stressed_day_historical_grouped
98 ItemType.REPORT_STRESS_CHANGE_WEEK_OVER_WEEK -> R.layout.card_stress_intensity_week_change_grouped
99 ItemType.IW_REPORT -> R.layout.card_insight_wizard_report_grouped
100 ItemType.RECOMMENDED_TOPICS -> throw IllegalArgumentException("Recommended topics are not supported in the group")
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/CardViewHolderFactory.kt:100:9Line detected, which is longer than the defined maximum line length in the code style.
97 ItemType.REPORT_MOST_STRESSED_DAY_OF_WEEK_HISTORICAL -> R.layout.card_weekly_most_stressed_day_historical_grouped
98 ItemType.REPORT_STRESS_CHANGE_WEEK_OVER_WEEK -> R.layout.card_stress_intensity_week_change_grouped
99 ItemType.IW_REPORT -> R.layout.card_insight_wizard_report_grouped
100 ItemType.RECOMMENDED_TOPICS -> throw IllegalArgumentException("Recommended topics are not supported in the group")
101 else -> throw IllegalArgumentException("Not implemented feed item for type Id: $itemType")
102 }
103 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/HeaderGroupViewHolder.kt:11:1Line detected, which is longer than the defined maximum line length in the code style.
8 import com.sharecare.realgreen.R
9 import com.sharecare.realgreen.databinding.HeaderGroupBinding
10
11 class HeaderGroupViewHolder private constructor(private val binding: HeaderGroupBinding) : RecyclerView.ViewHolder(binding.root) {
12
13 fun onBind(text: String) {
14 binding.letterTextView.text = text
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/PHRItemSwipeCareTeamHolder.kt:12:1Line detected, which is longer than the defined maximum line length in the code style.
9 import com.sharecare.realgreen.util.ItemTouchHelperExtension.Extension
10
11
12 class PHRItemSwipeCareTeamHolder private constructor(bindingSwipe: ItemPhrSwipeListBinding, dependentId: String?) : PHRCareTeamsItemHolder(bindingSwipe, dependentId),
13 Extension {
14
15 private val callView = bindingSwipe.callPhrView.also { it.setOnClickListener(this) }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/healthwallet/HealthWalletFieldQRCodeViewHolder.kt:10:1Line detected, which is longer than the defined maximum line length in the code style.
7 import com.sharecare.realgreen.databinding.ItemHealthWalletFieldQrCodeBinding
8 import com.sharecare.realgreen.wallet.repo.WalletImageProvider
9
10 class HealthWalletFieldQRCodeViewHolder(private val walletImageProvider: WalletImageProvider, private val binding: ItemHealthWalletFieldQrCodeBinding) : BindableViewHolder<Field>(binding.root) {
11
12 override fun onBind(item: Field) {
13 binding.key.text = item.titleToDisplay
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/healthwallet/HealthWalletFieldViewHolder.kt:13:1Line detected, which is longer than the defined maximum line length in the code style.
10 import com.sharecare.realgreen.type.FieldType
11 import org.joda.time.DateTime
12
13 class HealthWalletFieldViewHolder(private val binding: ItemHealthWalletFieldBinding) : BindableViewHolder<Field>(binding.root) {
14
15 override fun onBind(item: Field) {
16 setFieldsVisibility(item)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/phr/PHRAllergiesItemHolder.kt:24:21Line detected, which is longer than the defined maximum line length in the code style.
21 } else {
22 val (severityColor, severityLabelResId) = getTintColorAndLabelBySeverity(hpRecord.severity)
23 if (severityColor != 0) icon.setTint(severityColor) else icon.clearTint()
24 val severityLabel = if (severityLabelResId != 0) itemView.context.getString(severityLabelResId) else ""
25 title.text = hpRecord.name
26 details.text = severityLabel
27 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/phr/PHRCareTeamsItemHolder.kt:23:1Line detected, which is longer than the defined maximum line length in the code style.
20 import com.sharecare.realgreen.finddoctor.model.DialogInformation
21 import com.sharecare.realgreen.finddoctor.presentation.profile.DoctorProfileUtil
22
23 open class PHRCareTeamsItemHolder protected constructor(bindingSwipe: ItemPhrSwipeListBinding, private val dependentId: String?) : PHRClickableItemHolder(bindingSwipe) {
24 private var physician: Physician? = null
25 private var careTeam: CareTeam? = null
26 protected var dialogInformation: List<DialogInformation>? = null
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/phr/PHRCareTeamsItemHolder.kt:47:9Line detected, which is longer than the defined maximum line length in the code style.
44
45 binding!!.providerIconLayout.visibility = View.VISIBLE
46
47 (healthSection as SynthesisPhysician).careTeam?.name = DoctorProfileUtil.standardizeDoctorFullName((healthSection as SynthesisPhysician).physician?.middleInitial, (healthSection as SynthesisPhysician).careTeam?.name)
48
49 if ((healthSection as SynthesisPhysician).careTeam?.name != null) {
50 binding!!.title.text = (healthSection as SynthesisPhysician).careTeam?.name
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/phr/PHRCareTeamsItemHolder.kt:55:9Line detected, which is longer than the defined maximum line length in the code style.
52
53 binding!!.source.ellipsize = TextUtils.TruncateAt.END
54 binding!!.source.maxLines = 1
55 binding!!.source.text = DoctorProfileUtil.getDoctorSpecialties((healthSection as SynthesisPhysician).physician?.specialties)
56 setNewItemsImageViewVisibility()
57
58 DataBindingAdapters.setImageUrl(binding!!.icon, (healthSection as SynthesisPhysician).physician?.profileImage,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/phr/PHRCareTeamsItemHolder.kt:63:13Line detected, which is longer than the defined maximum line length in the code style.
60 ImageLoader.Transformation.CIRCLE)
61 binding!!.chipGroup.removeAllViews()
62 getTags(healthSection as SynthesisPhysician).forEach {
63 binding!!.chipGroup.addView(DataBindingUtil.inflate<TofuChipBinding>(LayoutInflater.from(context), R.layout.tofu_chip,
64 binding!!.chipGroup, false).also { tofuChipBinding ->
65 tofuChipBinding.name = it
66 }.root)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/phr/PHRClickableItemHolder.kt:21:1Line detected, which is longer than the defined maximum line length in the code style.
18 import java.util.Date
19
20
21 abstract class PHRClickableItemHolder protected constructor(protected var bindSwipeListBinding: ItemPhrSwipeListBinding) : RecyclerView
22 .ViewHolder(bindSwipeListBinding.root), View.OnClickListener {
23
24 protected var healthSection: HealthSection? = null
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/phr/PHRClickableItemHolder.kt:40:13Line detected, which is longer than the defined maximum line length in the code style.
37 binding!!.textViewDate.visibility = View.VISIBLE
38
39 if (healthSection?.observationDate!! > getLastEntered()) {
40 binding!!.textViewDate.setTextColor(ContextCompat.getColor(binding!!.textViewDate.context,R.color.type_high))
41 }
42
43 val marginParams = binding!!.layoutContainer.layoutParams as ViewGroup.MarginLayoutParams
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/phr/PHRDetailItemHolder.kt:15:1Line detected, which is longer than the defined maximum line length in the code style.
12 import com.sharecare.realgreen.databinding.ItemPhrSwipeListBinding
13 import com.sharecare.realgreen.util.LegacyNavigatorImpl
14
15 open class PHRDetailItemHolder private constructor(bindingSwipeListBinding: ItemPhrSwipeListBinding) : PHRClickableItemHolder(bindingSwipeListBinding) {
16
17 private var categoryTypeName: String? = null
18
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/phr/PHRDetailItemHolder.kt:25:5Line detected, which is longer than the defined maximum line length in the code style.
22 } ?: System.currentTimeMillis()
23 }
24
25 fun onBind(healthSection: HealthSection, isLast: Boolean, editMode: Boolean, categoryTypeName: String, editPage: Boolean) {
26 this.editPage = editPage
27 this.healthSection = healthSection
28 this.categoryTypeName = categoryTypeName
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/CtaBindingExts.kt:148:37Line detected, which is longer than the defined maximum line length in the code style.
145 popBack()
146 } else {
147 api.requireInteractions()
148 ?.onCtaPress(attributes?.get(TemplateAttributeName.FIRST_OPTION_TEXT.value) as String)
149 openLink(link)
150 }
151 api.requireAnalyticsApi()?.reportAnalyticsForFirstOptionAction(attributes, true)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/CtaBindingExts.kt:214:37Line detected, which is longer than the defined maximum line length in the code style.
211 popBack()
212 } else {
213 api.requireInteractions()
214 ?.onCtaPress(attributes?.get(TemplateAttributeName.SECOND_OPTION_TEXT.value) as String)
215 openLink(link)
216 }
217 api.requireAnalyticsApi()?.reportAnalyticsForSecondOptionAction(attributes, true)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/dynamicgroupedview/presenter/DynamicGroupedViewPresenter.kt:48:9Line detected, which is longer than the defined maximum line length in the code style.
45
46 // This listening should happen outside of FeedAdapter class, as it expects to have List and not the IOfflineWrapper
47 private val offlineWrapperListener = object : SomethingChangeListener<ItemRecord> {
48 override fun onSomethingChanged(oldResults: RealmResults<ItemRecord>, newResults: RealmResults<ItemRecord>, changeSet: OrderedCollectionChangeSet?) {
49 if (!PreferenceStore.isVideoPlaying() || PreferenceStore.getSelectedFilterIndex() == FeedFilter.indexOf(FeedFilter.PINNED)) {
50 applyToView {
51 scrollToPositionByFirstVisibleItem(visibleScrollPosition)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/dynamicgroupedview/presenter/DynamicGroupedViewPresenter.kt:49:13Line detected, which is longer than the defined maximum line length in the code style.
46 // This listening should happen outside of FeedAdapter class, as it expects to have List and not the IOfflineWrapper
47 private val offlineWrapperListener = object : SomethingChangeListener<ItemRecord> {
48 override fun onSomethingChanged(oldResults: RealmResults<ItemRecord>, newResults: RealmResults<ItemRecord>, changeSet: OrderedCollectionChangeSet?) {
49 if (!PreferenceStore.isVideoPlaying() || PreferenceStore.getSelectedFilterIndex() == FeedFilter.indexOf(FeedFilter.PINNED)) {
50 applyToView {
51 scrollToPositionByFirstVisibleItem(visibleScrollPosition)
52 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/dynamicgroupedview/view/DynamicGroupedItemFragment.kt:49:1Line detected, which is longer than the defined maximum line length in the code style.
46 import com.sharecare.realgreen.model.SurveyAnswer
47 import com.sharecare.realgreen.view.DividerItemDecoration
48
49 class DynamicGroupedItemFragment : BaseMvpFragment<DynamicGroupedViewPresenter, DynamicGroupedItemMvpView>(), DynamicGroupedItemMvpView {
50 private lateinit var binding: FragmentDynamicGroupBinding
51 private lateinit var dynamicGroupAdapter: DynamicGroupedFeedV3Adapter
52 private var focusIdChanged: Boolean = false
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/dynamicgroupedview/view/DynamicGroupedItemFragment.kt:78:13Line detected, which is longer than the defined maximum line length in the code style.
75 override fun onCreate(savedInstanceState: Bundle?) {
76 super.onCreate(savedInstanceState)
77 if (NetworkUtil.isNetworkAvailable(requireContext())) {
78 SocketConnection.registerForSocketConnection(lifecycle, EventType.DG_UPDATED, object : ClientWebSocket.MessageListener {
79 override fun onSocketMessage(message: String?, params: JsonElement?) {
80 presenter.onSocketMessage(message, params)
81 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/dynamicgroupedview/view/DynamicGroupedItemFragment.kt:110:13Line detected, which is longer than the defined maximum line length in the code style.
107 }
108 binding.commonComponents.items.apply {
109 layoutManager = LinearLayoutManager(requireContext())
110 addItemDecoration(DividerItemDecoration(ViewCoreUtilJava.dpToPx(requireContext(), BaseFeedFragment.DIVIDER_HEIGHT)))
111 }
112 setupSeeWhatsNew()
113 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/dynamicgroupedview/view/DynamicGroupedItemFragment.kt:132:29Line detected, which is longer than the defined maximum line length in the code style.
129 }, LayoutMode.VERTICAL, impressionTracker, focusedIndex, groupWidth).apply {
130 templateItemListener =
131 object : TemplateItemListener {
132 override fun onSubmitSurveyAnswers(answer: SurveyAnswer, onSubmitFailed: () -> Unit, onSubmitSuccess: () -> Unit) {
133 presenter.submitSurveyAnswers(answer, onSubmitFailed, onSubmitSuccess)
134 }
135
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/dynamicgroupedview/view/DynamicGroupedItemFragment.kt:256:9Line detected, which is longer than the defined maximum line length in the code style.
253 }
254
255 override fun loadNewItemsForScrollPostion(scrolltoNewPosition: Boolean) {
256 presenter.getNewCardsForScrollPosition(if (scrolltoNewPosition) dynamicGroupAdapter.itemCount else DynamicGroupedViewPresenter.DEFAULT_SCROLL_POSITION)
257 }
258
259 override fun notifyAdapterForDataSetChange() {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/dynamicgroupedview/view/DynamicGroupedItemFragment.kt:287:9Line detected, which is longer than the defined maximum line length in the code style.
284 private const val GROUP_SUBTITLE = "group_subtitle"
285 private const val SHOW_DATE_TAG = "show_date_tag"
286
287 fun startActivity(context: Context, groupId: String, groupItemId: String, groupTitle: String, groupSubtitle: String?) =
288 context.startActivity(Intent(context, DynamicGroupedItemFragment::class.java).apply {
289 putExtras(Bundle().apply {
290 putString(GROUP_ID, groupId)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/groupedview/presenter/DailyCheckInChapterPresenter.kt:9:1Line detected, which is longer than the defined maximum line length in the code style.
6 import com.sharecare.realgreen.core.util.withDefaultSchedulers
7 import com.sharecare.realgreen.repository.feed.item.ItemDataRepository
8
9 class DailyCheckInChapterPresenter(val chapterOverViewUrl: String?, val repository: ItemDataRepository = ItemDataRepository()): MvpPresenter<DailyCheckinChapterView>() {
10
11 override fun onViewAttached() {
12 applyToView { showProgress() }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/groupedview/view/CardSnapHelper.kt:124:6Line detected, which is longer than the defined maximum line length in the code style.
121 * Finds and returns the next index to snap.
122 *
123 * For forward scrolling, this tries to find the index from the first index by incrementing.
124 * Returns the index if the valid next index is found, otherwise returns the final index which means reaching the end edge.
125 *
126 * For backward scrolling, this tries to find the index from the last index by decrementing.
127 * Returns the index if the valid next index is found, otherwise returns the final index which means reaching the start edge.
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/groupedview/view/CardSnapHelper.kt:127:6Line detected, which is longer than the defined maximum line length in the code style.
124 * Returns the index if the valid next index is found, otherwise returns the final index which means reaching the end edge.
125 *
126 * For backward scrolling, this tries to find the index from the last index by decrementing.
127 * Returns the index if the valid next index is found, otherwise returns the final index which means reaching the start edge.
128 */
129 override fun findTargetSnapPosition(
130 layoutManager: RecyclerView.LayoutManager,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/groupedview/view/DailyCheckInChapterOverView.kt:25:1Line detected, which is longer than the defined maximum line length in the code style.
22 import com.sharecare.realgreen.databinding.FragmentDailyCheckinChapterOverviewBinding
23 import com.sharecare.realgreen.view.BackgroundStackHelper
24
25 class DailyCheckInChapterOverView: BaseMvpFragment<DailyCheckInChapterPresenter, DailyCheckinChapterView>(), DailyCheckinChapterView {
26
27
28 private lateinit var binding: FragmentDailyCheckinChapterOverviewBinding
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/groupedview/view/DailyCheckInChapterOverView.kt:101:13Line detected, which is longer than the defined maximum line length in the code style.
98 binding.subtitle.text = chapterOverView.subtitle
99
100 val widthMeasureSpec =
101 View.MeasureSpec.makeMeasureSpec(requireContext().resources.displayMetrics.widthPixels, View.MeasureSpec.AT_MOST)
102 val heightMeasureSpec = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED)
103 binding.subtitle.measure(widthMeasureSpec, heightMeasureSpec)
104 binding.collapsingToolbar.expandedTitleMarginBottom =
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/groupedview/view/DateHeaderViewHolder.kt:15:1Line detected, which is longer than the defined maximum line length in the code style.
12 }
13
14
15 class HorizontalDateHeaderViewHolder(private val binding: HorizontalHeaderThcBinding) : DateHeaderViewHolder(binding.root) {
16 override fun onBind(time: Long) {
17 binding.header.text = DateUtil.getMonthAndDate(DateTime(time))
18 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/groupedview/view/DynamicGroupedItemViewHolder.kt:47:1Line detected, which is longer than the defined maximum line length in the code style.
44 import com.takusemba.multisnaprecyclerview.SnapGravity
45
46
47 class DynamicGroupedItemViewHolder(itemView: View) : FeedViewHolder(itemView, null), DynamicGroupedItemMvpView, ViewStateListener {
48
49 private val binding: CardGroupBinding? = DataBindingUtil.getBinding(itemView)
50 private val presenter: DynamicGroupedViewPresenter by lazy {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/groupedview/view/DynamicGroupedItemViewHolder.kt:70:5Line detected, which is longer than the defined maximum line length in the code style.
67 private var dynamicGroupedAdapter: DynamicGroupedFeedV3Adapter? = null
68
69
70 override fun onBind(item: ItemRecord, activity: Activity, feedEventsHandler: FeedEventsHandler, feedImpressionEventsHandler: FeedImpressionEventsHandler, position: Int) {
71 init(activity, item, true, feedEventsHandler, feedImpressionEventsHandler, position)
72 }
73
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/groupedview/view/DynamicGroupedItemViewHolder.kt:95:21Line detected, which is longer than the defined maximum line length in the code style.
92 binding?.let {
93 groupedItemData?.let { o ->
94 if (o.groupId == TooltipTag.HomeJourneyGroup.contentId) {
95 L.d(TOOLTIPS_LOG_TAG, "Binding HomeJourney in ${this::class.simpleName} (record ->> contentId=${itemRecord.contentId}")
96 TooltipTag.HomeJourneyGroup.assignToView(it.layout)
97 }
98 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/groupedview/view/DynamicGroupedItemViewHolder.kt:167:21Line detected, which is longer than the defined maximum line length in the code style.
164 val fragment = DynamicGroupedItemFragment.makeInstance(groupedItemData?.groupId ?: "",
165 getGroupTitle(), getGroupSubTitle(),
166 containerId = itemRecord.serverId,
167 showDateTag = groupedItemData?.groupDetailsPageDecorations?.contains(GroupDecoration.PUBLISH_DATE.name)
168 ?: false)
169 controller.goToNextFragment(fragment, addToBackStack = true, replaceInContainer = false)
170 AnalyticsCore.pageView(if (groupedItemData?.groupWidth == GroupWidth.NARROW.name) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/groupedview/view/DynamicGroupedItemViewHolder.kt:213:29Line detected, which is longer than the defined maximum line length in the code style.
210 groupViewPosition = adapterPosition
211 templateItemListener =
212 object : TemplateItemListener {
213 override fun onSubmitSurveyAnswers(answer: SurveyAnswer, onSubmitFailed: () -> Unit, onSubmitSuccess: () -> Unit) {
214 presenter.submitSurveyAnswers(answer, onSubmitFailed, onSubmitSuccess)
215 }
216
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/groupedview/view/DynamicGroupedItemViewHolder.kt:254:21Line detected, which is longer than the defined maximum line length in the code style.
251 if (focusedItemId != groupFocusedIndex) {
252 groupFocusedIndex = focusedItemId
253 (binding?.itemViewPager?.layoutManager as LinearLayoutManager)
254 .scrollToPositionWithOffset(focusedIndex, activity!!.resources.getDimensionPixelSize(R.dimen.spacing_12dp))
255 }
256 }
257
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/groupedview/view/DynamicGroupedItemViewHolder.kt:350:5Line detected, which is longer than the defined maximum line length in the code style.
347 }
348 }
349
350 private fun shouldShowDateTag(): Boolean = groupedItemData?.groupDecorations?.contains(GroupDecoration.PUBLISH_DATE.name)
351 ?: false
352
353 private fun applyGroupDecoration() {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/groupedview/view/GroupedItemViewHolder.kt:88:21Line detected, which is longer than the defined maximum line length in the code style.
85 it.groupSubtitle.text = groupedItemData?.groupSubtitle
86 groupedItemData?.let { o ->
87 if (o.groupId == TooltipTag.HomeJourneyGroup.contentId) {
88 L.d(TOOLTIPS_LOG_TAG, "Binding HomeJourney ${this::class.simpleName} (record ->> contentId=${itemRecord.contentId}")
89 TooltipTag.HomeJourneyGroup.assignToView(it.layout)
90 }
91 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/groupedview/view/GroupedItemViewHolder.kt:158:21Line detected, which is longer than the defined maximum line length in the code style.
155 impressionTracker).apply {
156 groupViewPosition = adapterPosition
157 templateItemListener = object : TemplateItemListener {
158 override fun onSubmitSurveyAnswers(answer: SurveyAnswer, onSubmitFailed: () -> Unit, onSubmitSuccess: () -> Unit) {
159 presenter?.submitSurveyAnswers(answer, onSubmitFailed, onSubmitSuccess)
160 }
161
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/groupedview/view/GroupedItemViewHolder.kt:210:9Line detected, which is longer than the defined maximum line length in the code style.
207
208 // This listening should happen outside of FeedAdapter class, as it expects to have List and not the IOfflineWrapper
209 private val iOfflineWrapperListener = object : SomethingChangeListener<ItemRecord> {
210 override fun onSomethingChanged(oldResults: RealmResults<ItemRecord>, newResults: RealmResults<ItemRecord>, changeSet: OrderedCollectionChangeSet?) {
211 //We want to enforce adapter to create a new views in case that there were items changes
212 binding?.itemViewPager?.adapter?.notifyDataSetChanged()
213 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/template/TemlpateFeedViewholder.kt:89:13Line detected, which is longer than the defined maximum line length in the code style.
86 api.requireInteractions()?.onRefreshClickListener(itemRecord.serverId)
87 }
88
89 override fun onSubmitSurveyAnswers(answer: SurveyAnswer, onSubmitFailed: () -> Unit, onSubmitSuccess: () -> Unit) {
90 api.requireInteractions()?.onSubmitSurveyAnswers(answer.apply { itemRecord = item }, onSubmitFailed, onSubmitSuccess)
91 }
92
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/template/TemlpateFeedViewholder.kt:90:17Line detected, which is longer than the defined maximum line length in the code style.
87 }
88
89 override fun onSubmitSurveyAnswers(answer: SurveyAnswer, onSubmitFailed: () -> Unit, onSubmitSuccess: () -> Unit) {
90 api.requireInteractions()?.onSubmitSurveyAnswers(answer.apply { itemRecord = item }, onSubmitFailed, onSubmitSuccess)
91 }
92
93 override fun showDetails() {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/template/TemlpateFeedViewholder.kt:104:21Line detected, which is longer than the defined maximum line length in the code style.
101 override fun requireAnalyticsApi() = object : TemplateAnalyticsApi {
102 override fun reportAnalyticsForFirstOptionAction(attributes: TemplateAttributes, markEngaged: Boolean) {
103 if (itemRecord.serverId != null) {
104 TemplateFeedAnalyticsHelper.reportAnalyticsForFirstOptionAction(attributes, requireRootAnalytics(), requireImpressionsHandler(),
105 requireItemRecord(), index + 1)
106 if (markEngaged)
107 FeedItemAnalytics.updateItemInteraction(itemRecord)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/template/TemlpateFeedViewholder.kt:113:21Line detected, which is longer than the defined maximum line length in the code style.
110
111 override fun reportAnalyticsForSecondOptionAction(attributes: TemplateAttributes, markEngaged: Boolean) {
112 if (itemRecord.serverId != null) {
113 TemplateFeedAnalyticsHelper.reportAnalyticsForSecondOptionAction(attributes, requireRootAnalytics(), requireImpressionsHandler(),
114 requireItemRecord(), index + 1)
115 if (markEngaged)
116 FeedItemAnalytics.updateItemInteraction(itemRecord)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/template/TemlpateFeedViewholder.kt:121:17Line detected, which is longer than the defined maximum line length in the code style.
118 }
119
120 override fun reportClickCardFromRootAnalytics() {
121 if (api.requireRootAnalytics() != null && api.requireItemRecord() != null && api.requireItemRecord()!!.serverId != null) {
122 with(TemplateFeedAnalyticsHelper.reportClickCardFromRootAnalytics(api.requireRootAnalytics()!!, getCardPosition(),
123 itemRecord.groupId, itemRecord.serverId)) {
124 if (api.layoutMode() == LayoutMode.HORIZONTAL) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/template/TemlpateFeedViewholder.kt:122:21Line detected, which is longer than the defined maximum line length in the code style.
119
120 override fun reportClickCardFromRootAnalytics() {
121 if (api.requireRootAnalytics() != null && api.requireItemRecord() != null && api.requireItemRecord()!!.serverId != null) {
122 with(TemplateFeedAnalyticsHelper.reportClickCardFromRootAnalytics(api.requireRootAnalytics()!!, getCardPosition(),
123 itemRecord.groupId, itemRecord.serverId)) {
124 if (api.layoutMode() == LayoutMode.HORIZONTAL) {
125 customParam(FeedItemAnalyticsInfo.GROUP_POSITION, getItemPosition())
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/template/TemlpateFeedViewholder.kt:132:17Line detected, which is longer than the defined maximum line length in the code style.
129 }
130
131 override fun reportAnalyticsForTapAction(attributes: TemplateAttributes, markEngaged: Boolean) {
132 TemplateFeedAnalyticsHelper.reportAnalyticsForTapAction(attributes, requireRootAnalytics(), requireImpressionsHandler(),
133 requireItemRecord(), index + 1)
134 if (markEngaged)
135 FeedItemAnalytics.updateItemInteraction(itemRecord)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/template/TemlpateFeedViewholder.kt:139:17Line detected, which is longer than the defined maximum line length in the code style.
136 }
137
138 override fun reportAnalyticsForFirstButtonAction(attributes: TemplateAttributes) {
139 TemplateFeedAnalyticsHelper.reportAnalyticsForFirstButtonAction(attributes, requireRootAnalytics(), requireImpressionsHandler(),
140 requireItemRecord(), index + 1)
141 }
142
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/template/TemlpateFeedViewholder.kt:144:17Line detected, which is longer than the defined maximum line length in the code style.
141 }
142
143 override fun reportAnalyticsForSecondButtonAction(attributes: TemplateAttributes) {
144 TemplateFeedAnalyticsHelper.reportAnalyticsForSecondButtonAction(attributes, requireRootAnalytics(), requireImpressionsHandler(),
145 requireItemRecord(), index + 1)
146 }
147
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/template/TemlpateFeedViewholder.kt:149:17Line detected, which is longer than the defined maximum line length in the code style.
146 }
147
148 override fun reportAnalyticsForPinMenuAction(attributes: TemplateAttributes, markEngaged: Boolean) {
149 TemplateFeedAnalyticsHelper.reportAnalyticsForPinMenuAction(attributes, requireRootAnalytics(), requireImpressionsHandler(),
150 requireItemRecord(), index + 1)
151 if (markEngaged)
152 FeedItemAnalytics.updateItemInteraction(itemRecord)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/template/TemlpateFeedViewholder.kt:156:17Line detected, which is longer than the defined maximum line length in the code style.
153 }
154
155 override fun reportAnalyticsForShareMenuAction(attributes: TemplateAttributes, markEngaged: Boolean) {
156 TemplateFeedAnalyticsHelper.reportAnalyticsForShareMenuAction(attributes, requireRootAnalytics(), requireImpressionsHandler(),
157 requireItemRecord(), index + 1)
158 if (markEngaged)
159 FeedItemAnalytics.updateItemInteraction(itemRecord)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/template/TemlpateFeedViewholder.kt:163:17Line detected, which is longer than the defined maximum line length in the code style.
160 }
161
162 override fun reportAnalyticsForMcqSubmitAction(attributes: TemplateAttributes, answer: String) {
163 TemplateFeedAnalyticsHelper.reportAnalyticsForMcqSubmitAction(attributes, requireRootAnalytics(), requireImpressionsHandler(),
164 requireItemRecord(), index + 1, answer)
165 }
166 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/template/TemlpateFeedViewholder.kt:172:13Line detected, which is longer than the defined maximum line length in the code style.
169
170 override fun onInit(
171 activity: Activity?, itemRecord: ItemRecord, navigationAwayAllowed: Boolean,
172 feedEventsHandler: FeedEventsHandler, feedImpressionEventsHandler: FeedImpressionEventsHandler?, position: Int,
173 ) {
174 createTemplateView()
175 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/template/TemplateLabelValueListBindingExts.kt:32:1Line detected, which is longer than the defined maximum line length in the code style.
29 }
30 }
31
32 private fun TemplateLabelValueListComponentBinding.applySelectionResultContext(attributes: LinkedTreeMap<String, Any>?) {
33 val options = attributes?.get(TemplateAttributeName.MCQ_OPTIONS.value) as List<Option>
34 view.showDividers = LinearLayoutCompat.SHOW_DIVIDER_NONE
35 view.removeAllViewsInLayout()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/template/TemplateLabelValueListBindingExts.kt:109:1Line detected, which is longer than the defined maximum line length in the code style.
106 }
107 }
108
109 private fun TemplateLabelValueListComponentBinding.applyTypedAnswerResultContext(attributes: LinkedTreeMap<String, Any>?) {
110 val options = attributes?.get(TemplateAttributeName.MCQ_OPTIONS.value) as List<Option>
111 view.showDividers = LinearLayoutCompat.SHOW_DIVIDER_NONE
112 view.removeAllViewsInLayout()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/template/common/BubbleTagStyle.kt:12:9Line detected, which is longer than the defined maximum line length in the code style.
9 TAG_THREE("tag3", R.attr.tagThree);
10
11 companion object {
12 fun getStyleByName(styleName: String) = values().firstOrNull{ styleName == it.style }?.styleRes ?: TAG_ONE.styleRes
13 }
14 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/template/common/TemplateAttributesExts.kt:201:25Line detected, which is longer than the defined maximum line length in the code style.
198 feedbackButtonClicked(secondAction.data!!.get("answer") as Boolean)
199 }
200 } else {
201 /*
202 Default behaviour from legacy clients, visibility is handled in the applyFeedbackButtonsTexts method old implementation
203 */
204 secondButton.setOnClickListener { feedbackButtonClicked(false) }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/template/common/TemplateAttributesExts.kt:212:13Line detected, which is longer than the defined maximum line length in the code style.
209 error = {
210 },
211 default = {
212 /*
213 Default behaviour from legacy clients, visibility is handled in the applyFeedbackButtonsTexts method old implementation
214 */
215 secondButton.setOnClickListener { feedbackButtonClicked(false) }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/template/common/TemplateAttributesExts.kt:238:25Line detected, which is longer than the defined maximum line length in the code style.
235 feedbackButtonClicked(firstAction.data!!.get("answer") as Boolean)
236 }
237 } else {
238 /*
239 Default behaviour from legacy clients, visibility is handled in the applyFeedbackButtonsTexts method old implementation
240 */
241 firstButton.setOnClickListener { feedbackButtonClicked(true) }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/template/common/TemplateAttributesExts.kt:249:13Line detected, which is longer than the defined maximum line length in the code style.
246 error = {
247 },
248 default = {
249 /*
250 Default behaviour from legacy clients, visibility is handled in the applyFeedbackButtonsTexts method old implementation
251 */
252 firstButton.setOnClickListener { feedbackButtonClicked(true) }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/template/common/TemplateAttributesExts.kt:502:2Line detected, which is longer than the defined maximum line length in the code style.
499 }
500
501 /**
502 * Applies the ACTION action to the specified view (main case - using in a branding tag, vertical component and menu icons)
503 */
504 fun TemplateAttributes.applyTapAction(
505 acknowledge: () -> Unit,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/template/common/TemplateAttributesExts.kt:1371:9Line detected, which is longer than the defined maximum line length in the code style.
1368 @Suppress("UNCHECKED_CAST")
1369 fun TemplateAttributes.getRootAnalytics(): List<TemplateAnalytics> {
1370 val map =
1371 if (this != null && this.containsKey(TemplateAttributeName.ANALYTICS.value)) this[TemplateAttributeName.ANALYTICS.value] as MutableList<LinkedTreeMap<String, Any>> else null
1372 // there was a decision among iOS, Android and Web devs
1373 // that we get only the first element of this array and
1374 // ignore the others
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/template/common/TemplateFeedViewHolderExts.kt:29:5Line detected, which is longer than the defined maximum line length in the code style.
26 }
27 updateView()
28 ItemRecordSynchronizationUtil.updateItemAction(itemRecord.serverId, false)
29 FeedItemAnalytics.reportItemPinAction(!itemRecord.isPinned, FeedItemAnalyticsInfo.create(itemRecord, adapterPosition + 1))
30 }
31
32 fun TemplateFeedViewholder.reportAnalyticsForTapAction(attributes: LinkedTreeMap<String, Any>?) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/template/widget/common/TemplateFeedAnalyticsHelper.kt:21:5Line detected, which is longer than the defined maximum line length in the code style.
18 object TemplateFeedAnalyticsHelper {
19
20 @JvmStatic
21 fun reportClickCardFromRootAnalytics(rootAnalytics: List<TemplateAnalytics>, cardPosition: Int, groupId: String, feedItemId: String): ActionEvent {
22 return FeedItemAnalytics.reportClickCardAction(cardPosition, groupId, feedItemId, rootAnalytics)
23 }
24
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/template/widget/common/TemplateFeedAnalyticsHelper.kt:31:9Line detected, which is longer than the defined maximum line length in the code style.
28 itemRecord: ItemRecord?,
29 cardPosition: Int,
30 ) {
31 reportAnalyticsForAction(attributes, TemplateAttributeName.ACTION.value, rootAnalytics, impressionsHandler, itemRecord, cardPosition)
32 }
33
34 fun reportAnalyticsForMcqSubmitAction(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/template/widget/common/TemplateWidget.kt:35:9Line detected, which is longer than the defined maximum line length in the code style.
32 parentTemplateWidget: TemplateWidget? = null,
33 ): View {
34 d("Inflating widget of type \"${template.type()}\"...")
35 val currentTemplateView = TemplateView.fromType(template.type(), api, communicationApi = object : TemplateComunicationApi {
36 override fun getSubViews(): MutableList<TemplateView>? {
37 return subViews
38 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/template/widget/impl/DetailsTemplateImpl.kt:38:5Line detected, which is longer than the defined maximum line length in the code style.
35 }
36
37
38 private fun applyMenuActionItems(binding: ActivityTemplateDetailedViewBinding, api: TemplateApi, attributes: LinkedTreeMap<String, Any>?) {
39 setUpToolbar(binding)
40
41 val toolbar = binding.toolbar.toolbar
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/template/widget/impl/HorizontalContainerTemplateImpl.kt:17:1Line detected, which is longer than the defined maximum line length in the code style.
14 import com.sharecare.realgreen.adapter.viewholder.timeline.template.widget.common.TemplateView
15 import com.sharecare.realgreen.databinding.TemplateComponentHorizontalContainerBinding
16
17 class HorizontalContainerTemplateImpl(val api: TemplateApi, private val communicationApi: TemplateComunicationApi?) : TemplateView,
18 TemplateApi by api {
19 override val layoutResId: Int = R.layout.template_component_horizontal_container
20
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/template/widget/impl/ImageTemplateImpl.kt:43:21Line detected, which is longer than the defined maximum line length in the code style.
40 api.requireContext().resources.run {
41 when {
42 attributes?.get(TemplateAttributeName.MAX_WIDTH.value) != null -> {
43 api.requireContext().convertDpToPx(attributes[TemplateAttributeName.MAX_WIDTH.value].toString().toFloat()).toInt()
44 }
45 containerWidth != null -> {
46 containerWidth
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/template/widget/impl/McqFormTemplateImpl.kt:24:1Line detected, which is longer than the defined maximum line length in the code style.
21 import com.sharecare.realgreen.model.SurveyAnswer
22 import com.sharecare.realgreen.view.mcq.McqInputItem
23
24 class McqFormTemplateImpl(val api: TemplateApi, private val communicationApi: TemplateComunicationApi?) : TemplateView, TemplateApi by api {
25 override val layoutResId = R.layout.template_component_mcq_form
26
27 lateinit var binding: TemplateComponentMcqFormBinding
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/template/widget/impl/McqFormTemplateImpl.kt:43:5Line detected, which is longer than the defined maximum line length in the code style.
40 return binding.toResult { bindings, _ -> bindings.questionContainer }
41 }
42
43 private fun applySubViewWithState(binding: TemplateComponentMcqFormBinding, attributes: LinkedTreeMap<String, Any>?) {
44 val submittedOn = attributes?.get(TemplateAttributeName.MCQ_SUBMITTED_AT.value)
45 if (submittedOn != null && submittedOn.toString().isNotEmpty()) {
46 with(binding) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/template/widget/impl/McqFormTemplateImpl.kt:50:29Line detected, which is longer than the defined maximum line length in the code style.
47 lastDateUpdate.visible = true
48 try {
49 val datetime =
50 DateUtil.getDateTimeForISO8601String(attributes[TemplateAttributeName.MCQ_SUBMITTED_AT.value].toString())
51 lastDateUpdate.visible = true
52 lastDateUpdate.text = api.requireContext().getString(
53 R.string.mcq_submitted_on,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/template/widget/impl/McqFormTemplateImpl.kt:116:33Line detected, which is longer than the defined maximum line length in the code style.
113 success = {
114 attributes?.get(TemplateAttributeName.MCQ_SUBMIT_ACTION.value)?.let { action ->
115 if (action is LinkedTreeMap<*, *> &&
116 action[TemplateActionName.ACTION_TYPE.value] == TemplateActionName.TEMPLATE_REPLACE.value
117 ) {
118 action[TemplateActionName.DATA.value]?.let {
119 if (it is LinkedTreeMap<*, *>) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/template/widget/impl/McqInputTemplateImpl.kt:23:1Line detected, which is longer than the defined maximum line length in the code style.
20 import com.sharecare.realgreen.view.mcq.McqSelectionInputLayout
21 import com.sharecare.realgreen.view.mcq.McqTextInputLayout
22
23 class McqInputTemplateImpl(val api: TemplateApi, private val comunicationApi: TemplateComunicationApi?) : TemplateView, TemplateApi by api, McqInputItem {
24
25
26 var isSubmitted = false
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/adapter/viewholder/timeline/template/widget/impl/McqInputTemplateImpl.kt:42:5Line detected, which is longer than the defined maximum line length in the code style.
39 return binding!!.toResult()
40 }
41
42 private fun initInputWidget(binding: TemplateComponentMcqFormInputBinding, template: TemplateComponent, attributes: LinkedTreeMap<String, Any>?) {
43 binding.inputLayout.removeAllViewsInLayout()
44 val inputView =
45 getInputLayout(attributes, McqInputWidgetType.fromString(template.widgetType))
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/database/tool/RealmMigration.kt:242:1Line detected, which is longer than the defined maximum line length in the code style.
239 schema.remove("AggregatedSensorsRecord")
240 schema.remove("AggregatedActivityRecognitionRecord")
241 schema.remove("AggregatedStepsRecord")
242 // schema.remove("CallRecord") //TODO: ORIGAMI-STRESS migrate this to Origami in the scope of the new stress tracker
243 // schema.remove("RelationshipRecord") //TODO: ORIGAMI-STRESS migrate this to Origami in the scope of the new stress tracker
244 schema.remove("MotionSensorRecord")
245 schema.remove("StepsRecord")
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/database/tool/RealmMigration.kt:243:1Line detected, which is longer than the defined maximum line length in the code style.
240 schema.remove("AggregatedActivityRecognitionRecord")
241 schema.remove("AggregatedStepsRecord")
242 // schema.remove("CallRecord") //TODO: ORIGAMI-STRESS migrate this to Origami in the scope of the new stress tracker
243 // schema.remove("RelationshipRecord") //TODO: ORIGAMI-STRESS migrate this to Origami in the scope of the new stress tracker
244 schema.remove("MotionSensorRecord")
245 schema.remove("StepsRecord")
246 schema.remove("AndroidSdkStepsBucketRecord")
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/devpanel/activity/DevPanelActiveSleepActivity.kt:50:13Line detected, which is longer than the defined maximum line length in the code style.
47
48 private fun attachListeners() {
49 binding.startTimeButton.setOnClickListener {
50 val timeDialog = TofuTimePickerDialog.newInstance(TimePickerDialog.OnTimeSetListener { radialPickerLayout, hourOfDay, minuteOfHour, seconds ->
51 ActiveSleepDevUtil.setProperty(DevPanelActiveSleepActivity@ this, ActiveSleepDevUtil.Property.TRACK_START_TIME_HOURS, hourOfDay)
52 ActiveSleepDevUtil.setProperty(DevPanelActiveSleepActivity@ this, ActiveSleepDevUtil.Property.TRACK_START_TIME_MINUTES, minuteOfHour)
53 binding.startTimeButton.setText(formatHoursMinutes(hourOfDay, minuteOfHour))
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/devpanel/activity/DevPanelActiveSleepActivity.kt:51:17Line detected, which is longer than the defined maximum line length in the code style.
48 private fun attachListeners() {
49 binding.startTimeButton.setOnClickListener {
50 val timeDialog = TofuTimePickerDialog.newInstance(TimePickerDialog.OnTimeSetListener { radialPickerLayout, hourOfDay, minuteOfHour, seconds ->
51 ActiveSleepDevUtil.setProperty(DevPanelActiveSleepActivity@ this, ActiveSleepDevUtil.Property.TRACK_START_TIME_HOURS, hourOfDay)
52 ActiveSleepDevUtil.setProperty(DevPanelActiveSleepActivity@ this, ActiveSleepDevUtil.Property.TRACK_START_TIME_MINUTES, minuteOfHour)
53 binding.startTimeButton.setText(formatHoursMinutes(hourOfDay, minuteOfHour))
54 },
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/devpanel/activity/DevPanelActiveSleepActivity.kt:52:17Line detected, which is longer than the defined maximum line length in the code style.
49 binding.startTimeButton.setOnClickListener {
50 val timeDialog = TofuTimePickerDialog.newInstance(TimePickerDialog.OnTimeSetListener { radialPickerLayout, hourOfDay, minuteOfHour, seconds ->
51 ActiveSleepDevUtil.setProperty(DevPanelActiveSleepActivity@ this, ActiveSleepDevUtil.Property.TRACK_START_TIME_HOURS, hourOfDay)
52 ActiveSleepDevUtil.setProperty(DevPanelActiveSleepActivity@ this, ActiveSleepDevUtil.Property.TRACK_START_TIME_MINUTES, minuteOfHour)
53 binding.startTimeButton.setText(formatHoursMinutes(hourOfDay, minuteOfHour))
54 },
55 if (ActiveSleepDevUtil.getTrackStartTimeHoursIfOverwritten(this) != null) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/devpanel/activity/DevPanelActiveSleepActivity.kt:69:17Line detected, which is longer than the defined maximum line length in the code style.
66 }
67 binding.endTimeButton.setOnClickListener {
68 val timeDialog = TimePickerDialog.newInstance({ radialPickerLayout, hourOfDay, minuteOfHour, seconds ->
69 ActiveSleepDevUtil.setProperty(DevPanelActiveSleepActivity@ this, ActiveSleepDevUtil.Property.TRACK_END_TIME_HOURS, hourOfDay)
70 ActiveSleepDevUtil.setProperty(DevPanelActiveSleepActivity@ this, ActiveSleepDevUtil.Property.TRACK_END_TIME_MINUTES, minuteOfHour)
71 binding.endTimeButton.setText(formatHoursMinutes(hourOfDay, minuteOfHour))
72 },
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/devpanel/activity/DevPanelActiveSleepActivity.kt:70:17Line detected, which is longer than the defined maximum line length in the code style.
67 binding.endTimeButton.setOnClickListener {
68 val timeDialog = TimePickerDialog.newInstance({ radialPickerLayout, hourOfDay, minuteOfHour, seconds ->
69 ActiveSleepDevUtil.setProperty(DevPanelActiveSleepActivity@ this, ActiveSleepDevUtil.Property.TRACK_END_TIME_HOURS, hourOfDay)
70 ActiveSleepDevUtil.setProperty(DevPanelActiveSleepActivity@ this, ActiveSleepDevUtil.Property.TRACK_END_TIME_MINUTES, minuteOfHour)
71 binding.endTimeButton.setText(formatHoursMinutes(hourOfDay, minuteOfHour))
72 },
73 if (ActiveSleepDevUtil.getTrackEndTimeHoursIfOverwritten(this) != null) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/devpanel/activity/DevPanelActiveSleepActivity.kt:93:13Line detected, which is longer than the defined maximum line length in the code style.
90 updateValuesForBoolean(ActiveSleepDevUtil.Property.IS_REPORT_CONFIRMED, binding.reportConfirmedButton)
91 }
92 binding.startTimeSwitch.setOnCheckedChangeListener({ buttonView, isChecked ->
93 ActiveSleepDevUtil.setProperty(DevPanelActiveSleepActivity@ this, ActiveSleepDevUtil.Property.TRACK_START_TIME_IS_OVERRIDE, isChecked)
94 binding.startTimeButton.isEnabled = isChecked
95 })
96 binding.endTimeSwitch.setOnCheckedChangeListener({ buttonView, isChecked ->
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/devpanel/activity/DevPanelActiveSleepActivity.kt:97:13Line detected, which is longer than the defined maximum line length in the code style.
94 binding.startTimeButton.isEnabled = isChecked
95 })
96 binding.endTimeSwitch.setOnCheckedChangeListener({ buttonView, isChecked ->
97 ActiveSleepDevUtil.setProperty(DevPanelActiveSleepActivity@ this, ActiveSleepDevUtil.Property.TRACK_END_TIME_IS_OVERRIDE, isChecked)
98 binding.endTimeButton.isEnabled = isChecked
99 })
100 binding.itemReceivedSwitch.setOnCheckedChangeListener({ buttonView, isChecked ->
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/devpanel/activity/DevPanelActiveSleepActivity.kt:101:13Line detected, which is longer than the defined maximum line length in the code style.
98 binding.endTimeButton.isEnabled = isChecked
99 })
100 binding.itemReceivedSwitch.setOnCheckedChangeListener({ buttonView, isChecked ->
101 ActiveSleepDevUtil.setProperty(DevPanelActiveSleepActivity@ this, ActiveSleepDevUtil.Property.IS_ITEM_RECEIVED_IS_OVERRIDE, isChecked)
102 binding.itemReceivedButton.isEnabled = isChecked
103 })
104 binding.reportConfirmedSwitch.setOnCheckedChangeListener({ buttonView, isChecked ->
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/devpanel/activity/DevPanelActiveSleepActivity.kt:105:13Line detected, which is longer than the defined maximum line length in the code style.
102 binding.itemReceivedButton.isEnabled = isChecked
103 })
104 binding.reportConfirmedSwitch.setOnCheckedChangeListener({ buttonView, isChecked ->
105 ActiveSleepDevUtil.setProperty(DevPanelActiveSleepActivity@ this, ActiveSleepDevUtil.Property.IS_REPORT_CONFIRMED_IS_OVERRIDE, isChecked)
106 binding.reportConfirmedButton.isEnabled = isChecked
107 })
108 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/devpanel/activity/DevPanelActiveSleepActivity.kt:121:9Line detected, which is longer than the defined maximum line length in the code style.
118 binding.startTimeButton.setText(formatHoursMinutes(
119 ActiveSleepDevUtil.getIntProperty(this, ActiveSleepDevUtil.Property.TRACK_START_TIME_HOURS),
120 ActiveSleepDevUtil.getIntProperty(this, ActiveSleepDevUtil.Property.TRACK_START_TIME_MINUTES)))
121 binding.startTimeButton.isEnabled = ActiveSleepDevUtil.getBooleanProperty(this, ActiveSleepDevUtil.Property.TRACK_START_TIME_IS_OVERRIDE)
122 binding.startTimeSwitch.isChecked = ActiveSleepDevUtil.getBooleanProperty(this, ActiveSleepDevUtil.Property.TRACK_START_TIME_IS_OVERRIDE)
123
124 binding.endTimeButton.setText(formatHoursMinutes(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/devpanel/activity/DevPanelActiveSleepActivity.kt:122:9Line detected, which is longer than the defined maximum line length in the code style.
119 ActiveSleepDevUtil.getIntProperty(this, ActiveSleepDevUtil.Property.TRACK_START_TIME_HOURS),
120 ActiveSleepDevUtil.getIntProperty(this, ActiveSleepDevUtil.Property.TRACK_START_TIME_MINUTES)))
121 binding.startTimeButton.isEnabled = ActiveSleepDevUtil.getBooleanProperty(this, ActiveSleepDevUtil.Property.TRACK_START_TIME_IS_OVERRIDE)
122 binding.startTimeSwitch.isChecked = ActiveSleepDevUtil.getBooleanProperty(this, ActiveSleepDevUtil.Property.TRACK_START_TIME_IS_OVERRIDE)
123
124 binding.endTimeButton.setText(formatHoursMinutes(
125 ActiveSleepDevUtil.getIntProperty(this, ActiveSleepDevUtil.Property.TRACK_END_TIME_HOURS),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/devpanel/activity/DevPanelActiveSleepActivity.kt:127:9Line detected, which is longer than the defined maximum line length in the code style.
124 binding.endTimeButton.setText(formatHoursMinutes(
125 ActiveSleepDevUtil.getIntProperty(this, ActiveSleepDevUtil.Property.TRACK_END_TIME_HOURS),
126 ActiveSleepDevUtil.getIntProperty(this, ActiveSleepDevUtil.Property.TRACK_END_TIME_MINUTES)))
127 binding.endTimeButton.isEnabled = ActiveSleepDevUtil.getBooleanProperty(this, ActiveSleepDevUtil.Property.TRACK_END_TIME_IS_OVERRIDE)
128 binding.endTimeSwitch.isChecked = ActiveSleepDevUtil.getBooleanProperty(this, ActiveSleepDevUtil.Property.TRACK_END_TIME_IS_OVERRIDE)
129
130 binding.itemReceivedButton.text = ActiveSleepDevUtil.getBooleanProperty(this, ActiveSleepDevUtil.Property.IS_ITEM_RECEIVED).toString()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/devpanel/activity/DevPanelActiveSleepActivity.kt:128:9Line detected, which is longer than the defined maximum line length in the code style.
125 ActiveSleepDevUtil.getIntProperty(this, ActiveSleepDevUtil.Property.TRACK_END_TIME_HOURS),
126 ActiveSleepDevUtil.getIntProperty(this, ActiveSleepDevUtil.Property.TRACK_END_TIME_MINUTES)))
127 binding.endTimeButton.isEnabled = ActiveSleepDevUtil.getBooleanProperty(this, ActiveSleepDevUtil.Property.TRACK_END_TIME_IS_OVERRIDE)
128 binding.endTimeSwitch.isChecked = ActiveSleepDevUtil.getBooleanProperty(this, ActiveSleepDevUtil.Property.TRACK_END_TIME_IS_OVERRIDE)
129
130 binding.itemReceivedButton.text = ActiveSleepDevUtil.getBooleanProperty(this, ActiveSleepDevUtil.Property.IS_ITEM_RECEIVED).toString()
131 binding.itemReceivedButton.isEnabled = ActiveSleepDevUtil.getBooleanProperty(this, ActiveSleepDevUtil.Property.IS_ITEM_RECEIVED_IS_OVERRIDE)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/devpanel/activity/DevPanelActiveSleepActivity.kt:130:9Line detected, which is longer than the defined maximum line length in the code style.
127 binding.endTimeButton.isEnabled = ActiveSleepDevUtil.getBooleanProperty(this, ActiveSleepDevUtil.Property.TRACK_END_TIME_IS_OVERRIDE)
128 binding.endTimeSwitch.isChecked = ActiveSleepDevUtil.getBooleanProperty(this, ActiveSleepDevUtil.Property.TRACK_END_TIME_IS_OVERRIDE)
129
130 binding.itemReceivedButton.text = ActiveSleepDevUtil.getBooleanProperty(this, ActiveSleepDevUtil.Property.IS_ITEM_RECEIVED).toString()
131 binding.itemReceivedButton.isEnabled = ActiveSleepDevUtil.getBooleanProperty(this, ActiveSleepDevUtil.Property.IS_ITEM_RECEIVED_IS_OVERRIDE)
132 binding.itemReceivedSwitch.isChecked = ActiveSleepDevUtil.getBooleanProperty(this, ActiveSleepDevUtil.Property.IS_ITEM_RECEIVED_IS_OVERRIDE)
133
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/devpanel/activity/DevPanelActiveSleepActivity.kt:131:9Line detected, which is longer than the defined maximum line length in the code style.
128 binding.endTimeSwitch.isChecked = ActiveSleepDevUtil.getBooleanProperty(this, ActiveSleepDevUtil.Property.TRACK_END_TIME_IS_OVERRIDE)
129
130 binding.itemReceivedButton.text = ActiveSleepDevUtil.getBooleanProperty(this, ActiveSleepDevUtil.Property.IS_ITEM_RECEIVED).toString()
131 binding.itemReceivedButton.isEnabled = ActiveSleepDevUtil.getBooleanProperty(this, ActiveSleepDevUtil.Property.IS_ITEM_RECEIVED_IS_OVERRIDE)
132 binding.itemReceivedSwitch.isChecked = ActiveSleepDevUtil.getBooleanProperty(this, ActiveSleepDevUtil.Property.IS_ITEM_RECEIVED_IS_OVERRIDE)
133
134 binding.reportConfirmedButton.text = ActiveSleepDevUtil.getBooleanProperty(this, ActiveSleepDevUtil.Property.IS_REPORT_CONFIRMED).toString()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/devpanel/activity/DevPanelActiveSleepActivity.kt:132:9Line detected, which is longer than the defined maximum line length in the code style.
129
130 binding.itemReceivedButton.text = ActiveSleepDevUtil.getBooleanProperty(this, ActiveSleepDevUtil.Property.IS_ITEM_RECEIVED).toString()
131 binding.itemReceivedButton.isEnabled = ActiveSleepDevUtil.getBooleanProperty(this, ActiveSleepDevUtil.Property.IS_ITEM_RECEIVED_IS_OVERRIDE)
132 binding.itemReceivedSwitch.isChecked = ActiveSleepDevUtil.getBooleanProperty(this, ActiveSleepDevUtil.Property.IS_ITEM_RECEIVED_IS_OVERRIDE)
133
134 binding.reportConfirmedButton.text = ActiveSleepDevUtil.getBooleanProperty(this, ActiveSleepDevUtil.Property.IS_REPORT_CONFIRMED).toString()
135 binding.reportConfirmedButton.isEnabled = ActiveSleepDevUtil.getBooleanProperty(this, ActiveSleepDevUtil.Property.IS_REPORT_CONFIRMED_IS_OVERRIDE)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/devpanel/activity/DevPanelActiveSleepActivity.kt:134:9Line detected, which is longer than the defined maximum line length in the code style.
131 binding.itemReceivedButton.isEnabled = ActiveSleepDevUtil.getBooleanProperty(this, ActiveSleepDevUtil.Property.IS_ITEM_RECEIVED_IS_OVERRIDE)
132 binding.itemReceivedSwitch.isChecked = ActiveSleepDevUtil.getBooleanProperty(this, ActiveSleepDevUtil.Property.IS_ITEM_RECEIVED_IS_OVERRIDE)
133
134 binding.reportConfirmedButton.text = ActiveSleepDevUtil.getBooleanProperty(this, ActiveSleepDevUtil.Property.IS_REPORT_CONFIRMED).toString()
135 binding.reportConfirmedButton.isEnabled = ActiveSleepDevUtil.getBooleanProperty(this, ActiveSleepDevUtil.Property.IS_REPORT_CONFIRMED_IS_OVERRIDE)
136 binding.reportConfirmedSwitch.isChecked = ActiveSleepDevUtil.getBooleanProperty(this, ActiveSleepDevUtil.Property.IS_REPORT_CONFIRMED_IS_OVERRIDE)
137 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/devpanel/activity/DevPanelActiveSleepActivity.kt:135:9Line detected, which is longer than the defined maximum line length in the code style.
132 binding.itemReceivedSwitch.isChecked = ActiveSleepDevUtil.getBooleanProperty(this, ActiveSleepDevUtil.Property.IS_ITEM_RECEIVED_IS_OVERRIDE)
133
134 binding.reportConfirmedButton.text = ActiveSleepDevUtil.getBooleanProperty(this, ActiveSleepDevUtil.Property.IS_REPORT_CONFIRMED).toString()
135 binding.reportConfirmedButton.isEnabled = ActiveSleepDevUtil.getBooleanProperty(this, ActiveSleepDevUtil.Property.IS_REPORT_CONFIRMED_IS_OVERRIDE)
136 binding.reportConfirmedSwitch.isChecked = ActiveSleepDevUtil.getBooleanProperty(this, ActiveSleepDevUtil.Property.IS_REPORT_CONFIRMED_IS_OVERRIDE)
137 }
138
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/devpanel/activity/DevPanelActiveSleepActivity.kt:136:9Line detected, which is longer than the defined maximum line length in the code style.
133
134 binding.reportConfirmedButton.text = ActiveSleepDevUtil.getBooleanProperty(this, ActiveSleepDevUtil.Property.IS_REPORT_CONFIRMED).toString()
135 binding.reportConfirmedButton.isEnabled = ActiveSleepDevUtil.getBooleanProperty(this, ActiveSleepDevUtil.Property.IS_REPORT_CONFIRMED_IS_OVERRIDE)
136 binding.reportConfirmedSwitch.isChecked = ActiveSleepDevUtil.getBooleanProperty(this, ActiveSleepDevUtil.Property.IS_REPORT_CONFIRMED_IS_OVERRIDE)
137 }
138
139 private fun formatHoursMinutes(hours: Int, minutes: Int) = hours.toString().padStart(2, '0') + ":" + minutes.toString().padStart(2, '0')
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/devpanel/activity/DevPanelActiveSleepActivity.kt:139:5Line detected, which is longer than the defined maximum line length in the code style.
136 binding.reportConfirmedSwitch.isChecked = ActiveSleepDevUtil.getBooleanProperty(this, ActiveSleepDevUtil.Property.IS_REPORT_CONFIRMED_IS_OVERRIDE)
137 }
138
139 private fun formatHoursMinutes(hours: Int, minutes: Int) = hours.toString().padStart(2, '0') + ":" + minutes.toString().padStart(2, '0')
140
141 private fun initToolbar() {
142 ToolbarUtil.setUpBackNavigationButton(binding.toolbar!!.toolbar, this)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/devpanel/activity/DevPanelActivity.kt:64:9Line detected, which is longer than the defined maximum line length in the code style.
61 val ticket = PreferenceStore.getTicketSetting()
62 val ticketJson = ParsingUtil.getGson().toJsonTree(ticket)
63 // expired token for correct format
64 ticketJson.asJsonObject.addProperty("access_token", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJqdGkiOiI1OTdmOWM4Yi05NGQ0LTRlYTItYjUzYy1jMzNkZmJjMWZkOTUifQ.hRgwJqI4bwTrISXWC-Ra_gAapprbd3xIzJZSKwCktcbynG1aIhPtFAiDEwBcMUV9PIrQeRkKcA0JrAHQr2m5vA")
65 PreferenceStore.setTicketSetting(ParsingUtil.getGson().fromJson(ticketJson, Ticket::class.java))
66 }
67
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/devpanel/adapter/DatabaseTableAdapter.kt:8:1Line detected, which is longer than the defined maximum line length in the code style.
5 import com.sharecare.realgreen.devpanel.adapter.viewholder.DatabaseTableViewHolder
6 import io.realm.RealmModel
7
8 class DatabaseTableAdapter(private val realmTables: List<Class<out RealmModel>>) : RecyclerView.Adapter<DatabaseTableViewHolder>() {
9
10 override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): DatabaseTableViewHolder {
11 return DatabaseTableViewHolder.create(parent)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/devpanel/adapter/NotificationsListAdapter.kt:9:1Line detected, which is longer than the defined maximum line length in the code style.
6 import com.sharecare.realgreen.devpanel.adapter.viewholder.NotificationListItemViewHolder
7 import com.sharecare.realgreen.devpanel.type.NotificationTestType
8
9 class NotificationsListAdapter(val listener: NotificationTriggerActivity.ActionListener) : RecyclerView.Adapter<NotificationListItemViewHolder>() {
10
11 override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): NotificationListItemViewHolder {
12 return NotificationListItemViewHolder.create(parent)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/devpanel/adapter/SharedPrefsListAdapter.kt:10:1Line detected, which is longer than the defined maximum line length in the code style.
7 import com.sharecare.realgreen.devpanel.activity.SharedPrefConfiguratorActivity
8 import com.sharecare.realgreen.devpanel.adapter.viewholder.SharedPreferencesListItemViewHolder
9
10 class SharedPrefsListAdapter(val listener: SharedPrefConfiguratorActivity.ActionListener) : RecyclerView.Adapter<SharedPreferencesListItemViewHolder>() {
11
12 enum class Group {
13 //Create a group with name of which keys should be stored together, requested by QA team
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/devpanel/adapter/viewholder/SharedPreferencesListItemViewHolder.kt:28:17Line detected, which is longer than the defined maximum line length in the code style.
25
26 binding.reset.setOnClickListener {
27 if (shouldBeEditable(item.second)) {
28 PreferenceStore.editBooleanPreference(item.first, !(BooleanUtils.toBooleanObject(item.second as String)))
29 } else {
30 PreferenceStore.removePreference(item.first)
31 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/di/AdvocacyModule.kt:48:5Line detected, which is longer than the defined maximum line length in the code style.
45 )
46 }
47 single { FabController(get(named(GlobalKoins.FabState)), get(), get(), get()) }
48 factory { (v: AdvocacyOverlayApi) -> AdvocacyPresenter(view = v, config = get(), repository = get(), advocacyAnalytics = get()) }
49 factory { AdvocacyAnalytics(get()) }
50 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/di/KoinMapping.kt:30:9Line detected, which is longer than the defined maximum line length in the code style.
27 onboardingModule()
28 ).apply {
29 if (BuildConfig.DEBUG) {
30 val debugModule: Module = getFunctionFromFile("com.sharecare.realgreen.di.DebugModule", "debugModule")?.call() as Module
31 this.add(debugModule)
32 }
33 if(BuildConfig.FLAVOR == "dev"){
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/di/KoinMapping.kt:34:9Line detected, which is longer than the defined maximum line length in the code style.
31 this.add(debugModule)
32 }
33 if(BuildConfig.FLAVOR == "dev"){
34 val devModule: Module = getFunctionFromFile("com.sharecare.realgreen.di.DevModule", "devModule")?.call() as Module
35 this.add(devModule)
36 }
37 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/di/KoinMapping.kt:41:2Line detected, which is longer than the defined maximum line length in the code style.
38
39 /**
40 * Helper function to call a static function via it's name
41 * Reason: only at runtime the build type is determined and therefore referencing to a /dev / debug module is only possible via reflection
42 */
43 @Utility(type = UtilityType.Reflection)
44 private fun getFunctionFromFile(fileName: String, funcName: String): KFunction<*>? {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/di/ServicesModule.kt:26:5Line detected, which is longer than the defined maximum line length in the code style.
23
24 @Suppress("RemoveExplicitTypeArguments")
25 fun servicesModule() = module(override = true) {
26 factory<ModalService> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.MODAL) as ModalServiceImpl }
27 factory<FabService> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.FAB) as FabServiceImpl }
28 factory<SSOServiceImpl> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.SSO) as SSOServiceImpl}
29 factory<AddressService> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.ADDRESS) as AddressService }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/di/ServicesModule.kt:28:5Line detected, which is longer than the defined maximum line length in the code style.
25 fun servicesModule() = module(override = true) {
26 factory<ModalService> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.MODAL) as ModalServiceImpl }
27 factory<FabService> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.FAB) as FabServiceImpl }
28 factory<SSOServiceImpl> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.SSO) as SSOServiceImpl}
29 factory<AddressService> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.ADDRESS) as AddressService }
30 factory<MarketService> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.MARKET) as MarketService }
31 factory<NotificationCenterServiceInterface> { ServiceFactory.getInstance()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/di/ServicesModule.kt:29:5Line detected, which is longer than the defined maximum line length in the code style.
26 factory<ModalService> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.MODAL) as ModalServiceImpl }
27 factory<FabService> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.FAB) as FabServiceImpl }
28 factory<SSOServiceImpl> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.SSO) as SSOServiceImpl}
29 factory<AddressService> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.ADDRESS) as AddressService }
30 factory<MarketService> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.MARKET) as MarketService }
31 factory<NotificationCenterServiceInterface> { ServiceFactory.getInstance()
32 .createService(ServiceFactory.ServiceType.NOTIFICATION_CENTER)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/di/ServicesModule.kt:30:5Line detected, which is longer than the defined maximum line length in the code style.
27 factory<FabService> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.FAB) as FabServiceImpl }
28 factory<SSOServiceImpl> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.SSO) as SSOServiceImpl}
29 factory<AddressService> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.ADDRESS) as AddressService }
30 factory<MarketService> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.MARKET) as MarketService }
31 factory<NotificationCenterServiceInterface> { ServiceFactory.getInstance()
32 .createService(ServiceFactory.ServiceType.NOTIFICATION_CENTER)
33 as NotificationCenterService
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/di/ServicesModule.kt:35:5Line detected, which is longer than the defined maximum line length in the code style.
32 .createService(ServiceFactory.ServiceType.NOTIFICATION_CENTER)
33 as NotificationCenterService
34 }
35 factory<AchieveService> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.ACHIEVE) as AchieveServiceImpl }
36 factory<UserSettingsService> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.USER_SETTINGS) as UserSettingsService }
37 factory<UsersService> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.USERS) as UsersService }
38 factory<EligibilityService> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.ELIGIBILITY) as EligibilityService }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/di/ServicesModule.kt:36:5Line detected, which is longer than the defined maximum line length in the code style.
33 as NotificationCenterService
34 }
35 factory<AchieveService> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.ACHIEVE) as AchieveServiceImpl }
36 factory<UserSettingsService> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.USER_SETTINGS) as UserSettingsService }
37 factory<UsersService> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.USERS) as UsersService }
38 factory<EligibilityService> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.ELIGIBILITY) as EligibilityService }
39 factory<AuthorizationsService> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.AUTHORIZATIONS) as AuthorizationsService }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/di/ServicesModule.kt:37:5Line detected, which is longer than the defined maximum line length in the code style.
34 }
35 factory<AchieveService> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.ACHIEVE) as AchieveServiceImpl }
36 factory<UserSettingsService> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.USER_SETTINGS) as UserSettingsService }
37 factory<UsersService> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.USERS) as UsersService }
38 factory<EligibilityService> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.ELIGIBILITY) as EligibilityService }
39 factory<AuthorizationsService> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.AUTHORIZATIONS) as AuthorizationsService }
40 factory<MfaService> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.MFA) as MfaServiceImpl }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/di/ServicesModule.kt:38:5Line detected, which is longer than the defined maximum line length in the code style.
35 factory<AchieveService> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.ACHIEVE) as AchieveServiceImpl }
36 factory<UserSettingsService> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.USER_SETTINGS) as UserSettingsService }
37 factory<UsersService> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.USERS) as UsersService }
38 factory<EligibilityService> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.ELIGIBILITY) as EligibilityService }
39 factory<AuthorizationsService> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.AUTHORIZATIONS) as AuthorizationsService }
40 factory<MfaService> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.MFA) as MfaServiceImpl }
41 factory<ExtendedOnboardingService> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.EXTENDED_ONBOARDING) as ExtendedOnboardingService }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/di/ServicesModule.kt:39:5Line detected, which is longer than the defined maximum line length in the code style.
36 factory<UserSettingsService> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.USER_SETTINGS) as UserSettingsService }
37 factory<UsersService> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.USERS) as UsersService }
38 factory<EligibilityService> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.ELIGIBILITY) as EligibilityService }
39 factory<AuthorizationsService> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.AUTHORIZATIONS) as AuthorizationsService }
40 factory<MfaService> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.MFA) as MfaServiceImpl }
41 factory<ExtendedOnboardingService> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.EXTENDED_ONBOARDING) as ExtendedOnboardingService }
42 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/di/ServicesModule.kt:41:5Line detected, which is longer than the defined maximum line length in the code style.
38 factory<EligibilityService> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.ELIGIBILITY) as EligibilityService }
39 factory<AuthorizationsService> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.AUTHORIZATIONS) as AuthorizationsService }
40 factory<MfaService> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.MFA) as MfaServiceImpl }
41 factory<ExtendedOnboardingService> { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.EXTENDED_ONBOARDING) as ExtendedOnboardingService }
42 }
43
44
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/engine/adapter/DynamicGroupedFeedV3Adapter.kt:127:13Line detected, which is longer than the defined maximum line length in the code style.
124
125 override fun onCreateHeaderViewHolder(parent: ViewGroup): DateHeaderViewHolder {
126 return if (groupViewMode == LayoutMode.HORIZONTAL) {
127 HorizontalDateHeaderViewHolder(DataBindingUtil.inflate<HorizontalHeaderThcBinding>(LayoutInflater.from(parent.context),
128 R.layout.horizontal_header_thc, parent, false))
129 } else {
130 VerticalDateHeaderViewHolder(DataBindingUtil.inflate<VerticalHeaderThcBinding>(LayoutInflater.from(parent.context),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/engine/adapter/DynamicGroupedFeedV3Adapter.kt:130:13Line detected, which is longer than the defined maximum line length in the code style.
127 HorizontalDateHeaderViewHolder(DataBindingUtil.inflate<HorizontalHeaderThcBinding>(LayoutInflater.from(parent.context),
128 R.layout.horizontal_header_thc, parent, false))
129 } else {
130 VerticalDateHeaderViewHolder(DataBindingUtil.inflate<VerticalHeaderThcBinding>(LayoutInflater.from(parent.context),
131 R.layout.vertical_header_thc, parent, false))
132 }
133
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/engine/adapter/FeedV3Adapter.kt:98:13Line detected, which is longer than the defined maximum line length in the code style.
95 override fun groupWidthType() = groupCardWidthType
96 override fun requireInteractions() = object : TemplateInteractionApi {
97
98 override fun onSubmitSurveyAnswers(surveyAnswer: SurveyAnswer, onSubmitFailed: () -> Unit, onSubmitSuccess: () -> Unit) {
99 templateItemListener?.onSubmitSurveyAnswers(surveyAnswer, onSubmitFailed, onSubmitSuccess)
100 }
101
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/engine/adapter/GroupedFeedV3Adapter.kt:26:1Line detected, which is longer than the defined maximum line length in the code style.
23 feedImpressionEventsHandler: FeedImpressionEventsHandler,
24 groupViewMode: LayoutMode,
25 impressionTracker: ImpressionTracker?
26 ) : FeedV3Adapter(context, items, feedEventsHandler, feedImpressionEventsHandler, null, groupViewMode, impressionTracker) {
27
28
29 private val groupedItemsViewTypesLayouts = SparseArray<Int>()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/engine/child/BaseFeedFragment.kt:52:1Line detected, which is longer than the defined maximum line length in the code style.
49 * Handles 'go to top' action button and empty state
50 * TODO handle Error state here
51 */
52 abstract class BaseFeedFragment<IView : FeedMvpView, IPresenter : FeedMvpPresenter<IView>> : BaseMvpFragment<IPresenter, IView>(), FeedMvpView {
53
54 /**
55 * A common layout part the is inlined into every descentan's UI via xml:
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/engine/child/BaseFeedFragment.kt:92:9Line detected, which is longer than the defined maximum line length in the code style.
89
90 // Common setting up of the RecyclerView
91 commonBinding.items.layoutManager = LinearLayoutManager(context)
92 commonBinding.items.addItemDecoration(DividerItemDecoration(ViewCoreUtilJava.dpToPx(requireContext(), DIVIDER_HEIGHT)))
93
94 commonBinding.items.addOnScrollListener(feedScrollListener)
95
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/engine/child/BaseFeedFragment.kt:97:9Line detected, which is longer than the defined maximum line length in the code style.
94 commonBinding.items.addOnScrollListener(feedScrollListener)
95
96 // Common setting up of the SwipeRefreshLayout
97 initPullToRefreshComponent(commonBinding.swipeContainer, SwipeRefreshLayout.OnRefreshListener { presenter.loadItemsToHead() })
98 }
99
100 /**
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/engine/child/BaseFeedFragment.kt:129:29Line detected, which is longer than the defined maximum line length in the code style.
126 }.apply {
127 templateItemListener =
128 object : TemplateItemListener {
129 override fun onSubmitSurveyAnswers(answer: SurveyAnswer, onSubmitFailed: () -> Unit, onSubmitSuccess: () -> Unit) {
130 presenter.submitSurveyAnswers(answer, onSubmitFailed, onSubmitSuccess)
131 }
132
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/engine/child/BaseFeedFragment.kt:139:13Line detected, which is longer than the defined maximum line length in the code style.
136
137 }
138 }
139 commonBinding.items.visible = wrapper.getCount() != 0 // not showing the header item while loading first results
140 }
141 }
142
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/engine/child/BaseFeedFragment.kt:167:13Line detected, which is longer than the defined maximum line length in the code style.
164 }
165
166 override fun getLastSortIndex(): Int? =
167 if (commonBinding.items.adapter != null && (commonBinding.items.adapter as FeedV3Adapter).lastSortIndex > 0) {
168 (commonBinding.items.adapter as FeedV3Adapter).lastSortIndex
169 } else {
170 null
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/engine/child/BaseFeedFragment.kt:225:9Line detected, which is longer than the defined maximum line length in the code style.
222
223 // This listening should happen outside of FeedAdapter class, as it expects to have List and not the IOfflineWrapper
224 private val iOfflineWrapperListener = object : SomethingChangeListener<ItemRecord> {
225 override fun onSomethingChanged(oldResults: RealmResults<ItemRecord>, newResults: RealmResults<ItemRecord>, changeSet: OrderedCollectionChangeSet?) {
226
227 if (!PreferenceStore.isVideoPlaying() || PreferenceStore.getSelectedFilterIndex() == FeedFilter.indexOf(FeedFilter.PINNED)) {
228 notifyAdapterForChanges()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/engine/child/BaseFeedFragment.kt:227:13Line detected, which is longer than the defined maximum line length in the code style.
224 private val iOfflineWrapperListener = object : SomethingChangeListener<ItemRecord> {
225 override fun onSomethingChanged(oldResults: RealmResults<ItemRecord>, newResults: RealmResults<ItemRecord>, changeSet: OrderedCollectionChangeSet?) {
226
227 if (!PreferenceStore.isVideoPlaying() || PreferenceStore.getSelectedFilterIndex() == FeedFilter.indexOf(FeedFilter.PINNED)) {
228 notifyAdapterForChanges()
229 }
230 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/engine/child/BaseHomeFeedFragment.kt:48:2Line detected, which is longer than the defined maximum line length in the code style.
45 import com.sharecare.realgreen.screen.sleep.EditSleepActivity
46
47 /**
48 * A base class for feed fragments that are shown in 'Home' root page. Meant to be a child fragment of [FeedHostFragment].
49 * Handles 'heart', 'bell' buttons in menu. Delegates 'filter' button click to the parent fragment ([FeedHostFragment])
50 */
51 abstract class BaseHomeFeedFragment<IView : HomeFeedMvpView, IPresenter : HomeFeedMvpPresenter<IView>>
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/engine/child/BaseHomeFeedFragment.kt:86:17Line detected, which is longer than the defined maximum line length in the code style.
83 super.onCreate(savedInstanceState)
84 if (NetworkUtil.isNetworkAvailable(requireContext())) {
85 SocketConnection.registerForSocketConnection(lifecycle, listOf(EventType.FEED_UPDATED,
86 EventType.NOTIFICATIONS_NEW, EventType.NEW_MSG, EventType.DG_UPDATED, EventType.ON_SCREEN_NOTIFICATIONS_NEW),
87 object : ClientWebSocket.MessageListener {
88 override fun onSocketMessage(message: String?, params: JsonElement?) {
89 presenter.onSocketMessage(message, params)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/engine/child/GeneralFeedFragment.kt:62:5Line detected, which is longer than the defined maximum line length in the code style.
59 get() = binding.toolbar.toolbar
60
61 // A shortcut for the parameter that was passed in arguments
62 private val feedFilter by lazy(LazyThreadSafetyMode.NONE) { requireArguments().getSerializable(KEY_FILTER) as FeedFilter }
63
64 override fun createPresenter() = GeneralFeedMvpPresenter(GreenDayRepositoryImpl.provideToExternalModule(),
65 ConfigurationRepositoryImpl.provideToExternalModule(),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/engine/child/GeneralFeedFragment.kt:92:13Line detected, which is longer than the defined maximum line length in the code style.
89 lifecycleScope.launch {
90 delay(2000)
91 //can be null when the feature is deactivated
92 val bell: View? = requireActivity().window.decorView.findViewById<View>(android.R.id.content)?.findViewById(R.id.bell)
93 if(bell != null) TooltipTag.HomeNotifications.assignToView(bell)
94 }
95
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/engine/child/GeneralFeedFragment.kt:102:21Line detected, which is longer than the defined maximum line length in the code style.
99
100 InetConnectivityWatchdog(this.requireActivity()).observe(viewLifecycleOwner,
101 Observer { connected ->
102 if (connected == true && binding.mainFeedHeaderView.heroVideoManager?.isThemeManagerSynced() != true) {
103 presenter.syncTheme()
104 binding.mainFeedHeaderView.shouldShowVideo(connected)
105 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/engine/child/GeneralFeedFragment.kt:160:21Line detected, which is longer than the defined maximum line length in the code style.
157 if (binding.mainFeedHeaderView.heroVideoManager != null) {
158 binding.mainFeedHeaderView.heroVideoManager!!.playPauseVideoByOffset(offset)
159 binding.mainFeedHeaderView.refreshPlayPauseButton()
160 (commonBinding.items.adapter as? FeedV3Adapter)?.onScrollListener()?.onScrolled(commonBinding.items, 0, 0)
161 }
162 }
163 })
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/engine/host/FeedHostFragment.kt:52:9Line detected, which is longer than the defined maximum line length in the code style.
49
50 override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
51 super.onActivityResult(requestCode, resultCode, data)
52 (childFragmentManager.fragments.firstOrNull() as BaseMvpFragment<*, *>?)?.onActivityResult(requestCode, resultCode, data)
53 }
54
55 override fun onActivityCreated(savedInstanceState: Bundle?) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/engine/presenter/FeedMvpPresenter.kt:46:9Line detected, which is longer than the defined maximum line length in the code style.
43 }
44
45 private val dataSetChangeListener = object : SomethingChangeListener<ItemRecord> {
46 override fun onSomethingChanged(oldResults: RealmResults<ItemRecord>, newResults: RealmResults<ItemRecord>, changeSet: OrderedCollectionChangeSet?) {
47 updateCoreElementsVisibility(newResults.size)
48 if (newResults.isNotEmpty()) {
49 dataUpdated()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/engine/presenter/FeedMvpPresenter.kt:161:61Line detected, which is longer than the defined maximum line length in the code style.
158 FeedItemsRepository(it).getItemCopyById(itemRecord.serverId)
159 ?.getData(ContentRecordData::class.java)
160 ?: groupId?.let { id ->
161 FeedItemsRepository(it).getGroupItemCopyByServerId(id, itemRecord.serverId)
162 ?.getData(ContentRecordData::class.java)
163 }
164 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/engine/presenter/GeneralFeedMvpPresenter.kt:20:1Line detected, which is longer than the defined maximum line length in the code style.
17 strategy: PresenterStrategy,
18 areFeedItemsToBeDeletedOnInit: Boolean,
19 val tooltipHandler: TooltipHandler
20 ) : HomeFeedMvpPresenter<GeneralFeedMvpView>(greenDayRepository, greenDayConfigurationRepository, strategy, areFeedItemsToBeDeletedOnInit) {
21
22
23 var previousOffsetValue: Int? = null
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/engine/presenter/HomeFeedMvpPresenter.kt:34:9Line detected, which is longer than the defined maximum line length in the code style.
31 private val greenDayConfigurationRepository: ConfigurationRepository,
32 private val strategy: PresenterStrategy,
33 areFeedItemsToBeDeletedOnInit: Boolean,
34 private val repository: NotificationCenterRepository = globalInjection().get()) : FeedMvpPresenter<V>(strategy, areFeedItemsToBeDeletedOnInit) {
35
36 override fun onViewAttached() {
37 super.onViewAttached()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/engine/presenter/HomeFeedMvpPresenter.kt:39:9Line detected, which is longer than the defined maximum line length in the code style.
36 override fun onViewAttached() {
37 super.onViewAttached()
38
39 //on show onboarding when no modal is about to be show; next time the feed fragment gets attached there can't be a result so the onboarding retriggers
40 (getView() as Fragment).lifecycleScope.launchWhenStarted {
41 with(globalInjection().get<ModalRepository>()) {
42 withTimeoutOrNull(globalInjection().get<ModalConfig>().timeoutMs) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/engine/presenter/HomeFeedMvpPresenter.kt:82:9Line detected, which is longer than the defined maximum line length in the code style.
79 )
80 }
81 }
82 } else if (message == EventType.NOTIFICATIONS_NEW.name || message == EventType.NEW_MSG.name || message == EventType.ON_SCREEN_NOTIFICATIONS_NEW.name) {
83 addDisposable(
84 RxWrapperUtil.create<Int> { repository.getUnseenNotificationsCount() }
85 .withDefaultSchedulers()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/engine/repository/FeedItemsRepository.kt:159:29Line detected, which is longer than the defined maximum line length in the code style.
156 for (itemRecord in itemRecords) {
157 itemRecord.groupId = thcPaginationResponse.groupId
158 if (itemRecord.itemType == ItemType.TEMPLATE.id) {
159 if (itemRecord.getData<ContentRecordData>(ContentRecordData::class.java)?.body?.isValid() == true) {
160 supportedItemRecords.add(itemRecord)
161 }
162 } else {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/engine/strategy/BookmarkedPresenterStrategy.kt:11:5Line detected, which is longer than the defined maximum line length in the code style.
8 class BookmarkedPresenterStrategy : PresenterStrategy() {
9 override fun getItems(repository: FeedItemsRepository) = repository.getBookmarkedItems()
10
11 override fun loadItems(feedItemsManager: FeedItemsManager, lastSortId: Int?, pageSize: Int?): Single<List<ItemRecord>> = feedItemsManager
12 .loadBookmarkedItems(lastSortId)
13 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/engine/strategy/DynamicGroupedItemsPresenterStrategy.kt:12:5Line detected, which is longer than the defined maximum line length in the code style.
9
10 class DynamicGroupedItemsPresenterStrategy(private val groupId: String, private val groupViewMode: LayoutMode) :
11 PresenterStrategy() {
12 override fun loadItems(feedItemsManager: FeedItemsManager, lastSortId: Int?, pageSize: Int?): Single<List<ItemRecord>> =
13 feedItemsManager.loadGroupedItems(groupId, lastSortId)
14
15 override fun getItems(repository: FeedItemsRepository) = when (groupViewMode) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/engine/strategy/GroupedItemsPresenterStrategy.kt:12:5Line detected, which is longer than the defined maximum line length in the code style.
9
10 class GroupedItemsPresenterStrategy(private val groupId: String, private val groupViewMode: LayoutMode) :
11 PresenterStrategy() {
12 override fun loadItems(feedItemsManager: FeedItemsManager, lastSortId: Int?, pageSize: Int?): Single<List<ItemRecord>> =
13 feedItemsManager.loadGroupedItems(groupId, lastSortId)
14
15 override fun getItems(repository: FeedItemsRepository) = when (groupViewMode) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/engine/strategy/RelationshipDetailsPresenterStrategy.kt:15:5Line detected, which is longer than the defined maximum line length in the code style.
12
13 override fun supportsEmptyState() = false
14
15 override fun loadItems(feedItemsManager: FeedItemsManager, lastSortId: Int?, pageSize: Int?): Single<List<ItemRecord>> = feedItemsManager
16 .loadRelationshipItems(lastSortId)
17 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/engine/strategy/SleepPresenterStrategy.kt:11:5Line detected, which is longer than the defined maximum line length in the code style.
8 class SleepPresenterStrategy : PresenterStrategy() {
9 override fun getItems(repository: FeedItemsRepository) = repository.getSleepItems()
10
11 override fun loadItems(feedItemsManager: FeedItemsManager, lastSortId: Int?, pageSize: Int?): Single<List<ItemRecord>> =
12 feedItemsManager.loadSleepItems(lastSortId)
13 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/engine/strategy/StepsPresenterStrategy.kt:11:5Line detected, which is longer than the defined maximum line length in the code style.
8 class StepsPresenterStrategy : PresenterStrategy() {
9 override fun getItems(repository: FeedItemsRepository) = repository.getStepsItems()
10
11 override fun loadItems(feedItemsManager: FeedItemsManager, lastSortId: Int?, pageSize: Int?): Single<List<ItemRecord>> =
12 feedItemsManager.loadStepsItems(lastSortId)
13 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/feedheader/HeroVideoManager.kt:134:5Line detected, which is longer than the defined maximum line length in the code style.
131 ?.takeIf { it.startsWith(HTTP) }
132 ?.let { Uri.parse(it).toString().replaceAfterLast(".", JPG) }
133
134 private fun getThemedVideoUrl() = ThemeManager.getConfiguration().getThemedVideoUrl(ThemeConfiguration.Type.FEED_TOP_VIEW)
135
136 override fun initExoPlayer() {
137 super.initExoPlayer()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/feedheader/HeroVideoManager.kt:155:9Line detected, which is longer than the defined maximum line length in the code style.
152
153
154 override fun initVideoSource() {
155 videoSource = ExtractorMediaSource.Factory(VideoCache.getHeroVideoCache(context)).createMediaSource(provideVideoUri())
156 updatePlayerWithVideoSource()
157 }
158
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/feedheader/MainFeedSubHeaderView.kt:24:2Line detected, which is longer than the defined maximum line length in the code style.
21 import org.joda.time.DateTime
22
23 /**
24 * View that represents a bottom panel of the header of Home screen. Displays the status of user's Green Day accomplishment
25 */
26 class MainFeedSubHeaderView(context: Context) : ConstraintLayout(context) {
27
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/feedheader/MainFeedSubHeaderView.kt:39:9Line detected, which is longer than the defined maximum line length in the code style.
36 }
37
38 fun refresh() {
39 val greenDay = GreenDayRepositoryImpl.provideToExternalModule().getGreenDaySynchronously(DateTime.now().toTrackerDateString())
40 val trackerConfiguration = ConfigurationRepositoryImpl.provideToExternalModule().getConfigurationSynchronously(DateTime.now())
41
42 val text: String
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/feedheader/MainFeedSubHeaderView.kt:40:9Line detected, which is longer than the defined maximum line length in the code style.
37
38 fun refresh() {
39 val greenDay = GreenDayRepositoryImpl.provideToExternalModule().getGreenDaySynchronously(DateTime.now().toTrackerDateString())
40 val trackerConfiguration = ConfigurationRepositoryImpl.provideToExternalModule().getConfigurationSynchronously(DateTime.now())
41
42 val text: String
43 TooltipTag.HomeHeroTileGdt.assignToView(header)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/tooltip/common/TooltipItem.kt:13:1Line detected, which is longer than the defined maximum line length in the code style.
10 import com.sharecare.realgreen.core.tool.tooltip.TOOLTIPS_LOG_TAG
11 import java.lang.RuntimeException
12
13 data class TooltipItem(val tooltipId:String = "", val reference: TooltipTag, val body: String = "empty", val type:String = "unspecified"){
14
15 companion object : Logger by AndroidLogger(TOOLTIPS_ENABLE_LOGS, TOOLTIPS_LOG_TAG) {
16 fun byResponseItem(responseItem:TooltipResponseItem): TooltipItem? {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/tooltip/common/TooltipItem.kt:19:17Line detected, which is longer than the defined maximum line length in the code style.
16 fun byResponseItem(responseItem:TooltipResponseItem): TooltipItem? {
17 return try {
18 val tag = TooltipTag.byElementId(responseItem.elementId)
19 val body = responseItem.body ?: throw RuntimeException("Error parsing tooltip body string. Body is null.")
20 TooltipItem(
21 tooltipId = responseItem.tooltipId ?: "missing id",
22 reference = tag,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/tooltip/common/TooltipItem.kt:34:1Line detected, which is longer than the defined maximum line length in the code style.
31 }
32 }
33
34 fun TooltipItem.toEngagementItem(engagementType: TooltipEngagementType): TooltipEngagementItem = TooltipEngagementItem(tooltipId,engagementType.name)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/tooltip/presenter/GeneralFeedTooltips.kt:39:9Line detected, which is longer than the defined maximum line length in the code style.
36 if (size != 1) bodyString += " (${index + 1}/${size})"
37 addBodyText(bodyString)
38 if (size != 1 && index != size - 1) skipButtonText(context.getString(R.string.btn_skip))
39 if (size == 1 || index == size - 1) actionButtonText(context.getString(R.string.btn_action_bar_done)) else actionButtonText(context.getString(R.string.btn_next))
40 }
41 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/tooltip/presenter/TooltipApi.kt:23:5Line detected, which is longer than the defined maximum line length in the code style.
20 fun provideAdapter(): FeedV3Adapter
21 fun provideLayoutManager(): LinearLayoutManager
22 fun provideAppBar():AppBarLayout
23 fun makeDialog(api: TooltipDialogApi, targetView: View, item: TooltipItem, size: Int, index: Int): TooltipDialogAbstraction
24 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/tooltip/presenter/TooltipHandler.kt:52:5Line detected, which is longer than the defined maximum line length in the code style.
49 class TooltipHandler(
50 api: TooltipApi,
51 private val logs: Logger = AndroidLogger(TOOLTIPS_ENABLE_LOGS, TOOLTIPS_LOG_TAG),
52 val service: TooltipService = ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TOOLTIPS) as TooltipServiceImpl,
53 val repository: TooltipRepository = RemoteTooltipRepository(logs, service = service)
54 ) : TooltipApi by api, Logger by logs {
55
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/tooltip/presenter/TooltipHandler.kt:63:5Line detected, which is longer than the defined maximum line length in the code style.
60 private val tileStatusFlow = MutableStateFlow(false)
61 private val handledTags = mutableListOf<TooltipTag>()
62 private val pendingTooltips = mutableListOf<suspend () -> Unit>()
63 private val handler by lazy { CoroutineExceptionHandler { _, exception -> e("TooltipHandler exception caught", exception) } }
64
65 fun notifyHeaderTileIsLoaded() {
66 v("The header tile is now in its definitive state.")
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/tooltip/presenter/TooltipHandler.kt:92:17Line detected, which is longer than the defined maximum line length in the code style.
89 fun onViewDetach() {
90 if(!resolved) {
91 attachJob?.let {
92 v("The view got detached before the tooltips had a chance to resolve. Canceling the flow. If the view gets attached the process will start again.")
93 it.cancel()
94 }
95 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/tooltip/presenter/TooltipHandler.kt:144:13Line detected, which is longer than the defined maximum line length in the code style.
141 val tagsFromHierarchy = extractViewHierarchy()
142 val tagsFromList: List<Pair<TooltipTag, Int>> = extractList()
143 val distinct = tagsFromHierarchy.map { it.first }.union(tagsFromList.map { it.first }).toList()
144 v("All potentially relevant tooltips are now distinguished! Matching with the remote to determine with tooltips are in fact pending")
145 val matches = repository.fetchMatchingTooltips(distinct)?.filter { !handledTags.contains(it.reference) }
146 val map: List<Triple<TooltipItem, View?, Int?>>? = matches?.map { item ->
147 val view: View? = tagsFromHierarchy.firstOrNull { it.first == item.reference }?.second
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/tooltip/presenter/TooltipHandler.kt:150:21Line detected, which is longer than the defined maximum line length in the code style.
147 val view: View? = tagsFromHierarchy.firstOrNull { it.first == item.reference }?.second
148 val position: Int? = tagsFromList.firstOrNull { it.first == item.reference }?.second
149 if (position == null && view == null) {
150 e("A tooltip's view is not necessarily referencable because I could a list item from the list that hasn't been bound yet. BUT: the at least the position must be known!")
151 throw RuntimeException("Either the position or the view must be provided at this stage for tag ${item.reference}")
152 }
153 Triple(item, view, position)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/tooltip/presenter/TooltipHandler.kt:151:21Line detected, which is longer than the defined maximum line length in the code style.
148 val position: Int? = tagsFromList.firstOrNull { it.first == item.reference }?.second
149 if (position == null && view == null) {
150 e("A tooltip's view is not necessarily referencable because I could a list item from the list that hasn't been bound yet. BUT: the at least the position must be known!")
151 throw RuntimeException("Either the position or the view must be provided at this stage for tag ${item.reference}")
152 }
153 Triple(item, view, position)
154 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/tooltip/presenter/TooltipHandler.kt:162:9Line detected, which is longer than the defined maximum line length in the code style.
159 }
160
161 private fun startResetMechanism() {
162 v("The tooltips should only be showed once per appStart. In practise this corresponds to this activity lifecycle")
163 provideActivity().lifecycle.addObserver(object : LifecycleObserver {
164 @Suppress("unused") //it's used! don't let the IDE trick you!
165 @OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/tooltip/presenter/TooltipHandler.kt:167:17Line detected, which is longer than the defined maximum line length in the code style.
164 @Suppress("unused") //it's used! don't let the IDE trick you!
165 @OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)
166 fun resetTooltipState() {
167 d("Activity got destroyed. Resetting tooltip state variable: this way tooltips will be fetched next time.")
168 resolved = false
169 }
170 })
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/tooltip/presenter/TooltipHandler.kt:175:9Line detected, which is longer than the defined maximum line length in the code style.
172
173 private fun extractViewHierarchy(): List<Pair<TooltipTag, View>> {
174 v("Scanning the view hierarchy for views relevant to tooltips..")
175 val taggedViews: List<View> = provideRoot().extractViewsFlat().filter { it.tag is TooltipTag && !handledTags.contains(it.tag) }.filter { it.visible }.filter { it.height != 0 && it.width != 0 }
176 if (taggedViews.map { it.tag as TooltipTag }.groupingBy { it }.eachCount().filter { it.value > 1 }.isNotEmpty()) throw RuntimeException("Duplicate tags found")
177 v("ViewHierarchy extracts: ${taggedViews.map { it.tag.toString() }} ")
178 return taggedViews.map { it.tag as TooltipTag to it }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/tooltip/presenter/TooltipHandler.kt:176:9Line detected, which is longer than the defined maximum line length in the code style.
173 private fun extractViewHierarchy(): List<Pair<TooltipTag, View>> {
174 v("Scanning the view hierarchy for views relevant to tooltips..")
175 val taggedViews: List<View> = provideRoot().extractViewsFlat().filter { it.tag is TooltipTag && !handledTags.contains(it.tag) }.filter { it.visible }.filter { it.height != 0 && it.width != 0 }
176 if (taggedViews.map { it.tag as TooltipTag }.groupingBy { it }.eachCount().filter { it.value > 1 }.isNotEmpty()) throw RuntimeException("Duplicate tags found")
177 v("ViewHierarchy extracts: ${taggedViews.map { it.tag.toString() }} ")
178 return taggedViews.map { it.tag as TooltipTag to it }
179 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/tooltip/presenter/TooltipHandler.kt:196:5Line detected, which is longer than the defined maximum line length in the code style.
193 }
194
195
196 private suspend fun processTooltips(sequence: List<Triple<TooltipItem, View?, Int?>>) = withContext(Dispatchers.Main) {
197 v("At this stage it's clear which tooltips will be displayed a thus the sequence of display.")
198 sequence.forEachIndexed { index, entry ->
199 handledTags.add(entry.first.reference) // (redundant) security mechanism to never show tooltips twice: this could become more relevant if the list needs to be observed
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/tooltip/presenter/TooltipHandler.kt:199:13Line detected, which is longer than the defined maximum line length in the code style.
196 private suspend fun processTooltips(sequence: List<Triple<TooltipItem, View?, Int?>>) = withContext(Dispatchers.Main) {
197 v("At this stage it's clear which tooltips will be displayed a thus the sequence of display.")
198 sequence.forEachIndexed { index, entry ->
199 handledTags.add(entry.first.reference) // (redundant) security mechanism to never show tooltips twice: this could become more relevant if the list needs to be observed
200 val routine: suspend () -> Unit = {
201 v("This logs appears because a tooltip just get display. Namely the tooltip with Tag = ${entry.first.reference}")
202 pendingTooltips.removeAt(0) // since the currently executed item is always the item at pos 0: remove on execution
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/tooltip/presenter/TooltipHandler.kt:201:17Line detected, which is longer than the defined maximum line length in the code style.
198 sequence.forEachIndexed { index, entry ->
199 handledTags.add(entry.first.reference) // (redundant) security mechanism to never show tooltips twice: this could become more relevant if the list needs to be observed
200 val routine: suspend () -> Unit = {
201 v("This logs appears because a tooltip just get display. Namely the tooltip with Tag = ${entry.first.reference}")
202 pendingTooltips.removeAt(0) // since the currently executed item is always the item at pos 0: remove on execution
203 var targetView: View? = entry.second
204 v("You never really know if its safe to prompt a tooltip: better call the function and thereby ensure the target view is known..")
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/tooltip/presenter/TooltipHandler.kt:202:17Line detected, which is longer than the defined maximum line length in the code style.
199 handledTags.add(entry.first.reference) // (redundant) security mechanism to never show tooltips twice: this could become more relevant if the list needs to be observed
200 val routine: suspend () -> Unit = {
201 v("This logs appears because a tooltip just get display. Namely the tooltip with Tag = ${entry.first.reference}")
202 pendingTooltips.removeAt(0) // since the currently executed item is always the item at pos 0: remove on execution
203 var targetView: View? = entry.second
204 v("You never really know if its safe to prompt a tooltip: better call the function and thereby ensure the target view is known..")
205 targetView = ensureViewState(entry, targetView)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/tooltip/presenter/TooltipHandler.kt:204:17Line detected, which is longer than the defined maximum line length in the code style.
201 v("This logs appears because a tooltip just get display. Namely the tooltip with Tag = ${entry.first.reference}")
202 pendingTooltips.removeAt(0) // since the currently executed item is always the item at pos 0: remove on execution
203 var targetView: View? = entry.second
204 v("You never really know if its safe to prompt a tooltip: better call the function and thereby ensure the target view is known..")
205 targetView = ensureViewState(entry, targetView)
206 if (TOOLTIP_ANALYTICS) TooltipAnalytics.reportDisplay(entry.first)
207 provideScope().launch(handler) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/tooltip/presenter/TooltipHandler.kt:213:33Line detected, which is longer than the defined maximum line length in the code style.
210 dialog.doDismiss()
211 provideScope().launch {
212 v("We didn't report tooltip engagement so far to make to many requests")
213 v("What was shown and what will never been seen again is determined by comparing progress of the sequence against whats left of it")
214 val viewedItems = sequence.filterIndexed { i, _ -> i <= index }.map { it.first }
215 val skippedItems = sequence.filterIndexed { i, _ -> i > index }.map { it.first }
216 repository.reportEngaged(viewedItems = viewedItems, skippedItems = skippedItems)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/tooltip/presenter/TooltipHandler.kt:227:33Line detected, which is longer than the defined maximum line length in the code style.
224 provideScope().launch(handler) {
225 val next = pendingTooltips.firstOrNull()
226 //report the whole sequence when the last dialog is clicked
227 if (next == null) provideScope().launch { repository.reportEngaged(viewedItems = sequence.map { it.first }) }
228 next?.invoke()
229 }
230 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/tooltip/presenter/TooltipHandler.kt:250:17Line detected, which is longer than the defined maximum line length in the code style.
247 if (target == null) {
248 //if the target view is null search for it more downward in the list
249 awaitScroll(entry.third!!, TOOLTIP_LOW_ANCHOR)
250 target = provideRecycler().findViewWithTag(entry.first.reference) ?: provideRoot().extractViewsFlat().firstOrNull { it.tag == entry.first.reference } // found!
251 provideAppBar().setExpanded(false, false) // since scrolling was necessary here, we need to assume the header should get collapsed: otherwise we risk to hide relevant pixel underneath
252 } else {
253 val targetPosition: Int? = provideRecycler().findContainingViewHolder(target)?.adapterPosition
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/tooltip/presenter/TooltipHandler.kt:251:17Line detected, which is longer than the defined maximum line length in the code style.
248 //if the target view is null search for it more downward in the list
249 awaitScroll(entry.third!!, TOOLTIP_LOW_ANCHOR)
250 target = provideRecycler().findViewWithTag(entry.first.reference) ?: provideRoot().extractViewsFlat().firstOrNull { it.tag == entry.first.reference } // found!
251 provideAppBar().setExpanded(false, false) // since scrolling was necessary here, we need to assume the header should get collapsed: otherwise we risk to hide relevant pixel underneath
252 } else {
253 val targetPosition: Int? = provideRecycler().findContainingViewHolder(target)?.adapterPosition
254 // if the target position is null: we don't deal with a list item and can just proceed.
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/tooltip/presenter/TooltipHandler.kt:258:21Line detected, which is longer than the defined maximum line length in the code style.
255 targetPosition?.let { pos ->
256 val last = provideLayoutManager().findLastVisibleItemPosition()
257 // if the last visible item is above the target item: we need to scroll
258 // also: what's visible in theory isn't visible in practise, we need to check if the view is visible for at least 20% for good UX
259 if (pos > last || target.topLeft().y() > (provideActivity().windowDimensions().second.toFloat() * 0.8f).toInt()) {
260 awaitScroll(pos, TOOLTIP_LOW_ANCHOR)
261 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/tooltip/presenter/TooltipHandler.kt:259:21Line detected, which is longer than the defined maximum line length in the code style.
256 val last = provideLayoutManager().findLastVisibleItemPosition()
257 // if the last visible item is above the target item: we need to scroll
258 // also: what's visible in theory isn't visible in practise, we need to check if the view is visible for at least 20% for good UX
259 if (pos > last || target.topLeft().y() > (provideActivity().windowDimensions().second.toFloat() * 0.8f).toInt()) {
260 awaitScroll(pos, TOOLTIP_LOW_ANCHOR)
261 }
262 //once scrolled there might be the issue that target hides under the header: that's enough! We order it to disappear!
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/tooltip/presenter/TooltipHandler.kt:262:21Line detected, which is longer than the defined maximum line length in the code style.
259 if (pos > last || target.topLeft().y() > (provideActivity().windowDimensions().second.toFloat() * 0.8f).toInt()) {
260 awaitScroll(pos, TOOLTIP_LOW_ANCHOR)
261 }
262 //once scrolled there might be the issue that target hides under the header: that's enough! We order it to disappear!
263 if(provideAppBar().bottomRight().y() > target.topLeft().y()) provideAppBar().setExpanded(false, false)
264 }
265 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/tooltip/presenter/TooltipHandler.kt:263:21Line detected, which is longer than the defined maximum line length in the code style.
260 awaitScroll(pos, TOOLTIP_LOW_ANCHOR)
261 }
262 //once scrolled there might be the issue that target hides under the header: that's enough! We order it to disappear!
263 if(provideAppBar().bottomRight().y() > target.topLeft().y()) provideAppBar().setExpanded(false, false)
264 }
265 }
266 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/tooltip/presenter/TooltipHandler.kt:274:9Line detected, which is longer than the defined maximum line length in the code style.
271 val screenHeight = provideActivity().windowDimensions().second
272 provideAppBar().setExpanded(false, true)
273 provideLayoutManager().smoothScrollToPosition(provideRecycler(), null, targetPosition)
274 delay(500L) //to improve the visualisation smooth scroll for a short moment but then proceed without smooth scroll
275 provideAppBar().setExpanded(false, false)
276 val recyclerTop = provideRecycler().topLeft().y()
277 val offset: Int = max(0, (screenHeight.toFloat() * anchor).toInt() - recyclerTop)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/tooltip/repository/RemoteTooltipRepository.kt:28:5Line detected, which is longer than the defined maximum line length in the code style.
25 var cache: MutableMap<TooltipItem, Boolean>? = null,
26 ) : TooltipRepository, Logger by logs {
27
28 override suspend fun reportEngaged(viewedItems: List<TooltipItem>, skippedItems: List<TooltipItem>, confirm: Boolean): Int = withContext(Dispatchers.IO) {
29 val includes: List<TooltipItem> = (viewedItems + skippedItems).filter {
30 when {
31 cache == null -> {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/tooltip/repository/RemoteTooltipRepository.kt:50:13Line detected, which is longer than the defined maximum line length in the code style.
47 }
48 }
49 if (includes.isNotEmpty() && confirm) {
50 val viewedToReport = viewedItems.filter { includes.contains(it) }.map { it.toEngagementItem(TooltipEngagementType.VIEWED) }
51 val skippedToReport = skippedItems.filter { includes.contains(it) }.map { it.toEngagementItem(TooltipEngagementType.SKIPPED) }
52 i("Reporting engagements. Viewed = ${viewedToReport.map { it.tooltipId }} ; Skipped = ${skippedToReport.map { it.tooltipId }}")
53 reportConfirmations(viewedToReport + skippedToReport)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/tooltip/repository/RemoteTooltipRepository.kt:51:13Line detected, which is longer than the defined maximum line length in the code style.
48 }
49 if (includes.isNotEmpty() && confirm) {
50 val viewedToReport = viewedItems.filter { includes.contains(it) }.map { it.toEngagementItem(TooltipEngagementType.VIEWED) }
51 val skippedToReport = skippedItems.filter { includes.contains(it) }.map { it.toEngagementItem(TooltipEngagementType.SKIPPED) }
52 i("Reporting engagements. Viewed = ${viewedToReport.map { it.tooltipId }} ; Skipped = ${skippedToReport.map { it.tooltipId }}")
53 reportConfirmations(viewedToReport + skippedToReport)
54 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/tooltip/repository/RemoteTooltipRepository.kt:52:13Line detected, which is longer than the defined maximum line length in the code style.
49 if (includes.isNotEmpty() && confirm) {
50 val viewedToReport = viewedItems.filter { includes.contains(it) }.map { it.toEngagementItem(TooltipEngagementType.VIEWED) }
51 val skippedToReport = skippedItems.filter { includes.contains(it) }.map { it.toEngagementItem(TooltipEngagementType.SKIPPED) }
52 i("Reporting engagements. Viewed = ${viewedToReport.map { it.tooltipId }} ; Skipped = ${skippedToReport.map { it.tooltipId }}")
53 reportConfirmations(viewedToReport + skippedToReport)
54 }
55 return@withContext includes.size
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/tooltip/repository/RemoteTooltipRepository.kt:73:5Line detected, which is longer than the defined maximum line length in the code style.
70 }
71
72
73 override suspend fun fetchMatchingTooltips(candidates: List<TooltipTag>): List<TooltipItem>? = withContext(Dispatchers.IO) {
74 try {
75 if (cache == null) {
76 i("Fetching tooltips from remote...")
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/tooltip/repository/RemoteTooltipRepository.kt:78:21Line detected, which is longer than the defined maximum line length in the code style.
75 if (cache == null) {
76 i("Fetching tooltips from remote...")
77 val response: List<TooltipItem> =
78 service.getTooltips().mapNotNull { responseItem: TooltipResponseItem -> TooltipItem.byResponseItem(responseItem) }
79 if (response.isEmpty()) d("The remote hasn't new new tooltips to display") else {
80 i("The remote responded with ${response.size} tooltips.")
81 d("Response details = $response")
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/tooltip/repository/RemoteTooltipRepository.kt:86:13Line detected, which is longer than the defined maximum line length in the code style.
83 cache = response.associateWith { false }.toMutableMap()
84
85 }
86 return@withContext (cache?.filter { !it.value })?.keys?.filter { candidates.contains(it.reference) }?.toList()
87 } catch (e: Exception) {
88 e(e.message, e)
89 return@withContext null
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/feed/tooltip/repository/TooltipRepository.kt:14:5Line detected, which is longer than the defined maximum line length in the code style.
11 * @confirm enabled report to server
12 * @return reportedCount, the count of item
13 */
14 suspend fun reportEngaged(viewedItems: List<TooltipItem> = listOf(), skippedItems: List<TooltipItem> = listOf(), confirm:Boolean = true):Int
15
16 /**
17 * Results in a list tooltip to display.
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/host/achieve/AchieveAdapter.kt:23:9Line detected, which is longer than the defined maximum line length in the code style.
20
21 override fun onCreateActualViewHolder(parent: ViewGroup, viewType: Int): AchieveViewHolder {
22 val inflater = LayoutInflater.from(parent.context)
23 val binding = DataBindingUtil.inflate<CardAchieveSubsectionBinding>(inflater, R.layout.card_achieve_subsection, parent, false)
24 return AchieveViewHolder(activity, binding)
25 }
26 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/host/achieve/AchieveGroupViewAdapter.kt:23:9Line detected, which is longer than the defined maximum line length in the code style.
20 override fun onCreateActualViewHolder(parent: ViewGroup, viewType: Int): AchieveGroupViewHolder {
21 val inflater = LayoutInflater.from(parent.context)
22 var cardWidth: Int? = null
23 val binding = DataBindingUtil.inflate<CardAchieveItemBinding>(inflater, R.layout.card_achieve_item, parent, false).apply {
24 val layoutParamsRef = card.layoutParams as RecyclerView.LayoutParams
25
26 if (groupWidth == GroupWidth.DEFAULT && constraints.itemWidth != null) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/host/achieve/AchieveGroupViewAdapter.kt:35:13Line detected, which is longer than the defined maximum line length in the code style.
32 activity.resources.getDimensionPixelOffset(R.dimen.spacing_l)) / 2
33 layoutParamsRef.rightMargin = activity.resources.getDimensionPixelOffset(R.dimen.spacing_s)
34
35 } else if (groupWidth == GroupWidth.DEFAULT && constraints.layoutAxis == Constraints.HORIZONTAL_SCROLL && items.size > 1) {
36 layoutParamsRef.width = activity.resources.displayMetrics.widthPixels -
37 activity.resources.getDimensionPixelOffset(R.dimen.spacing_xxl)
38 layoutParamsRef.rightMargin = activity.resources.getDimensionPixelOffset(R.dimen.spacing_s)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/host/achieve/AchieveGroupViewAdapter.kt:47:13Line detected, which is longer than the defined maximum line length in the code style.
44 layoutParamsRef.leftMargin = activity.resources.getDimensionPixelOffset(R.dimen.spacing_m)
45 }
46
47 if (constraints.itemHeight != null && constraints.layoutAxis == Constraints.HORIZONTAL_SCROLL && items.size > 1) {
48 layoutParamsRef.height = activity.convertDpToPx(constraints.itemHeight!!.toFloat()).toInt()
49 }
50 cardWidth = layoutParamsRef.width
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/host/achieve/AchieveGroupViewHolder.kt:70:13Line detected, which is longer than the defined maximum line length in the code style.
67 }
68
69 override fun layoutMode(): LayoutMode {
70 return if (constraints.layoutAxis == Constraints.HORIZONTAL_SCROLL && constraints.itemWidth == null && constraints.itemHeight == null) {
71 LayoutMode.HORIZONTAL
72 } else {
73 LayoutMode.VERTICAL
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/host/achieve/AchieveViewHolder.kt:16:1Line detected, which is longer than the defined maximum line length in the code style.
13 import com.takusemba.multisnaprecyclerview.SnapGravity
14
15
16 class AchieveViewHolder(val activity: Activity, private val binding: CardAchieveSubsectionBinding) : BindableViewHolder<AchieveGroups>(binding.root) {
17
18 override fun onBind(item: AchieveGroups) {
19 applyGroupDecoartions(item)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/host/achieve/programs/presenter/AchieveProgramPresenter.kt:11:1Line detected, which is longer than the defined maximum line length in the code style.
8 import com.sharecare.realgreen.core.util.withDefaultSchedulers
9 import com.sharecare.realgreen.host.achieve.programs.ui.AchieveProgramView
10
11 class AchieveProgramPresenter(private val benefitsRepository: BenefitsHubRepository) : BasePresenter<AchieveProgramView>() {
12
13 companion object {
14 const val SC_DIGITAL = "sc_digital"
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/host/achieve/ui/AchieveRootFragment.kt:61:9Line detected, which is longer than the defined maximum line length in the code style.
58 binding.items.visibility = View.VISIBLE
59 binding.messageView.visibility = View.GONE
60 binding.items.layoutManager = LinearLayoutManager(context)
61 binding.items.adapter = AchieveAdapter(requireActivity(), groups.filter { it.items.isNotEmpty() }, clickListener)
62 }
63
64 override fun showOfflineScreen() {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/host/discover/AutocompleteLocationSuggestionHolder.kt:7:1Line detected, which is longer than the defined maximum line length in the code style.
4 import com.sharecare.realgreen.core.tool.listadapter.viewholder.BindableViewHolder
5 import com.sharecare.realgreen.databinding.ItemLocationSuggestionBinding
6
7 class AutocompleteLocationSuggestionHolder(private var binding: ItemLocationSuggestionBinding): BindableViewHolder<Prediction>(binding.root) {
8 override fun onBind(item: Prediction) {
9 binding.description.text = item.description
10 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/host/discover/CohortSelectionFragment.kt:34:1Line detected, which is longer than the defined maximum line length in the code style.
31 fun displayOptions(result: List<Any>, cohortOption: CohortOption?)
32 }
33
34 class CohortSelectionFragment : RxFragment<CohortSelectionPresenter, CohortSelectionFragmentView>(), CohortSelectionFragmentView {
35 private lateinit var binding: CohortSelectionFragmentBinding
36 private lateinit var cohortAdapter: CohortAdapter
37
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/host/discover/CohortSelectionFragment.kt:39:9Line detected, which is longer than the defined maximum line length in the code style.
36 private lateinit var cohortAdapter: CohortAdapter
37
38 override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
39 binding = DataBindingUtil.inflate(inflater, R.layout.cohort_selection_fragment, null, true) as CohortSelectionFragmentBinding
40 setupToolbar()
41 reportCohortPageView()
42 return binding.root
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/host/discover/CohortSelectionFragment.kt:94:1Line detected, which is longer than the defined maximum line length in the code style.
91 }
92 }
93
94 class CohortAdapter(data: List<Any>, var selectedOption: CohortOption? = null, val onCohortChanges: (cohortId: CohortOption) -> Unit = {}) : GenericAdapter(data) {
95 private var selectedView: CohortSelectionOptionView? = null
96
97 override val itemFactory = object : GenericItemFactory() {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/host/discover/DiscoverBaseFragment.kt:328:9Line detected, which is longer than the defined maximum line length in the code style.
325
326 private fun goToSearchResults(searchTerm: String?, type: SearchType?) {
327 val controller = this.getNavigationController()
328 controller.goToNextFragment(SearchResultsActivity.makeInstance(searchTerm, type, latitude, longitude), true, false)
329 }
330
331 private fun checkLocationPermissions() {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/host/discover/DiscoverBaseFragment.kt:335:17Line detected, which is longer than the defined maximum line length in the code style.
332 when (checkAnyOnePermission(this, PermissionsUtil.PermissionValue.LOCATION)) {
333 PermissionsUtil.PermissionState.MAY_BE_ASKED, PermissionsUtil.PermissionState.PREVIOUSLY_DENIED -> {
334 // ask for permission
335 requestPermissions(PermissionsUtil.PermissionValue.LOCATION.permissionNames, PERMISSIONS_MAIN_REQUEST_CODE)
336 }
337 PermissionsUtil.PermissionState.PERMANENTLY_DISABLED -> {
338 locationBarDisplay()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/host/discover/DiscoverBaseFragment.kt:435:9Line detected, which is longer than the defined maximum line length in the code style.
432 binding.locationBar.stateName.text = placeDetails.description
433 initUserLocationMapItem()
434
435 /*Clearing the "Doctors" category and resetting to default category if the user current location is other than US*/
436 if (placeDetails.country != COUNTRY_CODE_US && PreferenceStore.getCategoryItem() == getString(R.string.category_doctors)) {
437 PreferenceStore.setCategoryItem(DEFAULT_CATEGORY)
438 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/host/discover/DiscoverBaseFragment.kt:436:9Line detected, which is longer than the defined maximum line length in the code style.
433 initUserLocationMapItem()
434
435 /*Clearing the "Doctors" category and resetting to default category if the user current location is other than US*/
436 if (placeDetails.country != COUNTRY_CODE_US && PreferenceStore.getCategoryItem() == getString(R.string.category_doctors)) {
437 PreferenceStore.setCategoryItem(DEFAULT_CATEGORY)
438 }
439
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/host/discover/DiscoverBaseFragment.kt:509:13Line detected, which is longer than the defined maximum line length in the code style.
506 }
507 binding.yourCommunity.viewMap.setOnClickListener {
508 reportViewMapClick()
509 context?.let { it -> NavigatorCoreUtil.toWebPage(it, yourCommunityResponse?.cta.href, true, replaceContainer = false) }
510 }
511 }
512
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/host/discover/DiscoverBaseFragment.kt:528:13Line detected, which is longer than the defined maximum line length in the code style.
525 map.mapType = GoogleMap.MAP_TYPE_NORMAL
526 nearByPlacesMap = map
527 nearByPlacesMap?.clear()
528 (childFragmentManager.findFragmentById(R.id.discover_places_map) as MapFragment).setListener(object : MapFragment(),
529 MapFragment.OnTouchListener {
530 override fun onTouch() {
531 binding.items.requestDisallowInterceptTouchEvent(true)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/host/discover/DiscoverBaseFragment.kt:613:17Line detected, which is longer than the defined maximum line length in the code style.
610 if (isAtLeastOnePermissionGranted(
611 requireContext(),
612 PermissionsUtil.PermissionValue.LOCATION
613 ) && locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER) && PreferenceStore.isCurrentLocation()
614 ) {
615 if (isPermissionGranted(requireContext(), Manifest.permission.ACCESS_FINE_LOCATION)) {
616 map?.addMarker(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/host/discover/LocationSearchFragment.kt:187:9Line detected, which is longer than the defined maximum line length in the code style.
184 }
185
186 private fun getHeaderView(): View {
187 val headerBinding = TipsTitleItemBinding.inflate(LayoutInflater.from(context), view?.parent as ViewGroup?, false)
188 with(headerBinding){
189 title.text = getString(R.string.search_results)
190 seeAll.visibility = View.GONE
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/host/discover/PlacesNearByCategorySelectionFragment.kt:49:13Line detected, which is longer than the defined maximum line length in the code style.
46
47 private fun iniViews() {
48 categoryList =
49 (requireContext().resources.getStringArray(R.array.places_nearby_category_list) as Array<*>).filterIsInstance<String>() as ArrayList
50 if (arguments?.get(EXTRA_COUNTRY) != DiscoverBaseFragment.COUNTRY_CODE_US) {
51 categoryList.removeAt(0)
52 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/host/discover/PlacesNearbyCategorySelectionHolder.kt:7:1Line detected, which is longer than the defined maximum line length in the code style.
4 import com.sharecare.realgreen.core.tool.listadapter.viewholder.BindableViewHolder
5 import com.sharecare.realgreen.databinding.ItemRadioSelectionBinding
6
7 class PlacesNearbyCategorySelectionHolder(val binding: ItemRadioSelectionBinding) : BindableViewHolder<String>(binding.root) {
8 override fun onBind(item: String) {
9 binding.radioButton.apply {
10 text = item
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/host/discover/presenter/DiscoverBasePresenter.kt:29:5Line detected, which is longer than the defined maximum line length in the code style.
26 var mapPlaces = arrayListOf<MapPlace>()
27
28 // below constants are defined based on the https://arnoldmedia.jira.com/browse/CS-231 requirement
29 private val radiusFactor = 1 // radiusFactor will increase up to MAX_STEP to fetch inside 50 mi444le in worst case scenario
30 private val RADIUS = 40233 //40233 meters is equals to 25 miles. used to fetch in google places
31 private val MIN_RESULT_COUNT = 3 // minimum results expected from places api
32
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/host/discover/service/YourHealthDataService.kt:27:13Line detected, which is longer than the defined maximum line length in the code style.
24 }
25
26 private val bearerProxy = createServiceWithBearerToken(
27 params.appConfiguration.getNetworkConfiguration().getHostForFeature(NetworkConfigurationType.REALAGE_PROGRAM),
28 YourHealthDataService.Proxy::class.java
29 )
30
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/host/discover/widgets/CategoryComparisonWidget.kt:28:9Line detected, which is longer than the defined maximum line length in the code style.
25
26 init {
27 val inflater = LayoutInflater.from(context)
28 binding = DataBindingUtil.inflate(inflater, R.layout.widget_category_comparision, this, true) as WidgetCategoryComparisionBinding
29 }
30
31 var data: Category? = null
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/host/discover/widgets/YourHealthRatMissingWidget.kt:21:9Line detected, which is longer than the defined maximum line length in the code style.
18
19 init {
20 val inflater = LayoutInflater.from(context)
21 binding = DataBindingUtil.inflate(inflater, R.layout.widget_your_health_rat_missing, this, true) as WidgetYourHealthRatMissingBinding
22 }
23
24 var onGetStarted: (() -> Unit)? = null
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/host/root/RootHostActivity.kt:121:21Line detected, which is longer than the defined maximum line length in the code style.
118 with(globalInjection().get<ModalRepository>()) {
119 withTimeoutOrNull(globalInjection().get<ModalConfig>().timeoutMs) {
120 return@withTimeoutOrNull if (DeepLinkStore.containsDeeplink()) {
121 //if the a deeplink started the activity the modal should not show: invalidate the repository and thereby anticipate further attempts during the session
122 L.d("modalscreen", "modalscreen : its a deeplink")
123 invalidateModals()
124 null
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/host/root/RootHostActivity.kt:185:33Line detected, which is longer than the defined maximum line length in the code style.
182 }
183 } else {
184 if (binding.bottomNavigation.selectedItemId != RootDestination.HOME.id) {
185 if (message == EventType.NOTIFICATIONS_NEW.name || message == EventType.ON_SCREEN_NOTIFICATIONS_NEW.name) {
186 disposable = RxWrapperUtil.create<Int> { globalInjection().get<NotificationCenterRepository>().getUnseenNotificationsCount() }
187 .withDefaultSchedulers()
188 .subscribe({ NotificationCenterSettings(this@RootHostActivity).seenCount = it
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/host/root/RootHostActivity.kt:186:37Line detected, which is longer than the defined maximum line length in the code style.
183 } else {
184 if (binding.bottomNavigation.selectedItemId != RootDestination.HOME.id) {
185 if (message == EventType.NOTIFICATIONS_NEW.name || message == EventType.ON_SCREEN_NOTIFICATIONS_NEW.name) {
186 disposable = RxWrapperUtil.create<Int> { globalInjection().get<NotificationCenterRepository>().getUnseenNotificationsCount() }
187 .withDefaultSchedulers()
188 .subscribe({ NotificationCenterSettings(this@RootHostActivity).seenCount = it
189 if (it > 0) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/host/you/YouRootFragment.kt:110:13Line detected, which is longer than the defined maximum line length in the code style.
107
108 override fun onOptionsItemSelected(item: MenuItem) =
109 if (item.itemId == R.id.settings) {
110 NavHostActivity::class.start(requireContext(), MainGraphDirections.toSettings(), SettingsGraphDirections.toMenu())
111 true
112 } else {
113 super.onOptionsItemSelected(item)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/host/you/YouRootFragment.kt:129:17Line detected, which is longer than the defined maximum line length in the code style.
126 private val clickListener = object : ItemClickListener<YouItem> {
127 override fun onClick(item: YouItem) {
128 when (item) {
129 YouItem.YOUR_REAL_AGE -> getNavigationController().goToNextFragment(YourRealAgeFragment.getInstance(YourRealAgeTabItem.SCORE))
130 YouItem.HEALTH_PROFILE -> getNavigationController().goToNextFragment(HealthProfileActivity(), true)
131 YouItem.RELATIONSHIPS -> getNavigationController().goToNextFragment(RelationshipRootFragment())
132 YouItem.WALLET -> getNavigationController().goToNextFragment(HealthWalletListFragment.makeInstance())
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/inappnotification/InAppNotificationUtil.kt:85:9Line detected, which is longer than the defined maximum line length in the code style.
82 }
83
84 private fun dismissNotification(notificationId: String) {
85 RxWrapperUtil.handleDisposable(task = globalInjection().get<NotificationCenterRepository>().deleteNotification(notificationId)
86 .withDefaultSchedulers(), onSuccess = {}, onError = { e -> L.e(e.message, e) })
87 }
88
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/inappnotification/InAppNotificationUtil.kt:91:9Line detected, which is longer than the defined maximum line length in the code style.
88
89 @JvmStatic
90 fun getAndDisplayInAppNotification(activity: Activity) {
91 RxWrapperUtil.handleDisposable(task = globalInjection().get<NotificationCenterRepository>().getOnScreenNotifications()
92 .withDefaultSchedulers()
93 .map {
94 it.toOfflineModel()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/navigation/NavHostActivity.kt:43:5Line detected, which is longer than the defined maximum line length in the code style.
40 ) : AppCompatActivity(R.layout.nav_host_activity), NavHostApi, Logger by logger {
41
42
43 override val navController: NavController by lazy { (supportFragmentManager.findFragmentByTag("nav_host") as NavHostFragment).navController }
44
45 override fun onCreate(savedInstanceState: Bundle?) {
46 super.onCreate(savedInstanceState)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/navigation/OnboardingNavigatorImpl.kt:21:9Line detected, which is longer than the defined maximum line length in the code style.
18 ) : OnboardingNavigator, Logger by logger, RootNavigator by root, WebNavigator by web {
19
20 override fun navToCustomerSupport() {
21 // NavigatorCoreUtil.toWebPage(findHost().requireContext(), NetworkConfigurationUtils().getNoAuthCustomerSupportPath(configManager.getConfiguration().getNetworkConfiguration()))
22 toWebPageSimple(NetworkConfigurationUtils().getNoAuthCustomerSupportPath(configManager.getConfiguration().getNetworkConfiguration()))
23 }
24
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/navigation/OnboardingNavigatorImpl.kt:22:9Line detected, which is longer than the defined maximum line length in the code style.
19
20 override fun navToCustomerSupport() {
21 // NavigatorCoreUtil.toWebPage(findHost().requireContext(), NetworkConfigurationUtils().getNoAuthCustomerSupportPath(configManager.getConfiguration().getNetworkConfiguration()))
22 toWebPageSimple(NetworkConfigurationUtils().getNoAuthCustomerSupportPath(configManager.getConfiguration().getNetworkConfiguration()))
23 }
24
25
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/navigation/RootNavigatorImpl.kt:31:6Line detected, which is longer than the defined maximum line length in the code style.
28
29 /**
30 * We pass the options manually in order add screen transitions in a central way.
31 * Options flags specified in the nav graph are lost when overriding the options (i.e popUpTo, launchSingleTop, inclusive)
32 * There we reparse the graph and reset the options as they where specified in the graph
33 */
34 override fun defaultOptions(directions: NavDirections?): NavOptions {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/navigation/RootNavigatorImpl.kt:64:9Line detected, which is longer than the defined maximum line length in the code style.
61 */
62 override fun logoutNavigation() {
63 val intent = Intent(findHost().requireContext(), LoginRegisterSelectorActivity::class.java)
64 intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK)
65 findHost().requireContext().startActivity(intent)
66 }
67
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/navigation/RootNavigatorImpl.kt:68:5Line detected, which is longer than the defined maximum line length in the code style.
65 findHost().requireContext().startActivity(intent)
66 }
67
68 override fun navigate(@IdRes id: Int, args: Bundle?, options: NavOptions) = findController().navigate(id, args, options)
69
70 override fun up(): Boolean = findController().navigateUp()
71
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/navigation/RootNavigatorImpl.kt:93:9Line detected, which is longer than the defined maximum line length in the code style.
90
91 override fun navToSync() {
92 val intent = Intent(findHost().requireContext(), SyncActivity::class.java)
93 intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK)
94 intent.putExtra(SyncActivity.EXTRA_REGISTRATION_FLAG, true)
95 findHost().requireContext().startActivity(intent)
96 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/navigation/SettingsNavigatorImpl.kt:51:9Line detected, which is longer than the defined maximum line length in the code style.
48 override fun navToDeveloperActivity() = findHost().requireActivity().startActivity<DevPanelActivity>()
49
50 override fun navToAboutUs() {
51 (configManager.getConfiguration().getFeatureConfiguration(FeatureConfigurationType.ABOUT_US) as? UrlConfiguration)?.getUrlLink().let { url ->
52 if (url == null) SettingsMenuFragmentDirections.toAbout()
53 else navigateToWeb(url)
54 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/navigation/SettingsNavigatorImpl.kt:58:9Line detected, which is longer than the defined maximum line length in the code style.
55 }
56
57 override fun navToSupport() {
58 navigateToWeb(configManager.getConfiguration().getNetworkConfiguration().getHostForFeature(NetworkConfigurationType.CUSTOMER_SUPPORT))
59 }
60
61 override fun navToSecurityPin() {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/navigation/WebNavigatorImpl.kt:55:13Line detected, which is longer than the defined maximum line length in the code style.
52 val activityR = findHost().requireActivity()
53 var resultUrl = url
54 if (url.isNotBlank()) {
55 if (!url.startsWith(params.httpPrefix) && !url.startsWith(params.httpsPrefix)) resultUrl = params.httpPrefix + resultUrl
56 val externalBrowserDestination = ExternalBrowserParser().parse(resultUrl)
57 if (externalBrowserDestination != null) externalBrowserDestination.start(findHost().requireActivity())
58 else {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/navigation/WebNavigatorImpl.kt:64:25Line detected, which is longer than the defined maximum line length in the code style.
61 try {
62 NavigatorCoreUtil.allowTheVeryNextAppEntrance()
63 when {
64 enrolmentWebView -> if (activityR is NavigationProvider) activityR.getNavigationController().goToNextFragment(EnrolmentWebViewFragment.makeInstance(resultUrl)) else ExternalWebViewActivity.startEnrolmentWebView(activityR, resultUrl)
65 accountCreation -> ExternalWebViewActivity.startBenefitsWebView(activityR, resultUrl, data!!)
66 else -> if (activityR is NavigationProvider) activityR.getNavigationController().goToNextFragment(WebViewFragment.makeInstance(resultUrl, url)) else ExternalWebViewActivity.start(findHost().requireActivity(), resultUrl, url)
67 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/navigation/WebNavigatorImpl.kt:66:25Line detected, which is longer than the defined maximum line length in the code style.
63 when {
64 enrolmentWebView -> if (activityR is NavigationProvider) activityR.getNavigationController().goToNextFragment(EnrolmentWebViewFragment.makeInstance(resultUrl)) else ExternalWebViewActivity.startEnrolmentWebView(activityR, resultUrl)
65 accountCreation -> ExternalWebViewActivity.startBenefitsWebView(activityR, resultUrl, data!!)
66 else -> if (activityR is NavigationProvider) activityR.getNavigationController().goToNextFragment(WebViewFragment.makeInstance(resultUrl, url)) else ExternalWebViewActivity.start(findHost().requireActivity(), resultUrl, url)
67 }
68 if (isTrackingSiteExit) {
69 val actionEvent = AnalyticsCore.action(GeneralAnalytics.Action.SITE_EXIT).customParam(GeneralAnalytics.State.URL, resultUrl)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/navigation/WebNavigatorImpl.kt:69:25Line detected, which is longer than the defined maximum line length in the code style.
66 else -> if (activityR is NavigationProvider) activityR.getNavigationController().goToNextFragment(WebViewFragment.makeInstance(resultUrl, url)) else ExternalWebViewActivity.start(findHost().requireActivity(), resultUrl, url)
67 }
68 if (isTrackingSiteExit) {
69 val actionEvent = AnalyticsCore.action(GeneralAnalytics.Action.SITE_EXIT).customParam(GeneralAnalytics.State.URL, resultUrl)
70 if (analyticsInfo != null) actionEvent.feedItemInfo(analyticsInfo)
71 }
72 } catch (e: ActivityNotFoundException) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/navigation/WebNavigatorImpl.kt:108:37Line detected, which is longer than the defined maximum line length in the code style.
105 enrolmentWebView -> {
106 if (context is NavigationProvider) {
107 context.getNavigationController()
108 .goToNextFragment(EnrolmentWebViewFragment.makeInstance(webUrl), replaceInContainer = replaceContainer)
109 } else {
110 ExternalWebViewActivity.startEnrolmentWebView(context, webUrl)
111 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/navigation/WebNavigatorImpl.kt:116:29Line detected, which is longer than the defined maximum line length in the code style.
113 }
114 accountCreation -> ExternalWebViewActivity.startBenefitsWebView(activity!!, webUrl, data!!)
115 else -> if (context is NavigationProvider) context.getNavigationController()
116 .goToNextFragment(fragment = WebViewFragment.makeInstance(webUrl, url), replaceInContainer = replaceContainer) else ExternalWebViewActivity.start(context, webUrl, url)
117 }
118 if (isTrackingSiteExit) {
119 val actionEvent = AnalyticsCore.action(GeneralAnalytics.Action.SITE_EXIT).customParam(GeneralAnalytics.State.URL, webUrl)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/navigation/WebNavigatorImpl.kt:119:25Line detected, which is longer than the defined maximum line length in the code style.
116 .goToNextFragment(fragment = WebViewFragment.makeInstance(webUrl, url), replaceInContainer = replaceContainer) else ExternalWebViewActivity.start(context, webUrl, url)
117 }
118 if (isTrackingSiteExit) {
119 val actionEvent = AnalyticsCore.action(GeneralAnalytics.Action.SITE_EXIT).customParam(GeneralAnalytics.State.URL, webUrl)
120 if (analyticsInfo != null) actionEvent.feedItemInfo(analyticsInfo)
121 }
122 } catch (e: ActivityNotFoundException) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/presenter/feed/item/FeedItemLoaderPresenter.kt:13:1Line detected, which is longer than the defined maximum line length in the code style.
10 import com.sharecare.realgreen.screen.feed.FeedItemLoaderMvpView
11 import io.realm.Realm
12
13 class FeedItemLoaderPresenter(val feedId: String?, val repository: ItemDataRepository = ItemDataRepository()) : MvpPresenter<FeedItemLoaderMvpView>() {
14
15 private val feedItemsRepository = FeedItemsRepository(Realm.getDefaultInstance())
16
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/presenter/feed/item/TemplateDetailPresenter.kt:18:1Line detected, which is longer than the defined maximum line length in the code style.
15 import com.sharecare.realgreen.tool.realminteraction.getData
16 import io.realm.Realm
17
18 open class TemplateDetailPresenter(val repository: TemplateDetailDataRepository = TemplateDetailDataRepository()) : DynamicFeedDetailsPresenter<TemplateDetailMvpView>() {
19
20 private val feedItemsRepository = FeedItemsRepository(Realm.getDefaultInstance())
21 private val surveyrepository = SurveyDataRepository()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/presenter/feed/item/TemplateModalPresenter.kt:13:1Line detected, which is longer than the defined maximum line length in the code style.
10 import com.sharecare.realgreen.screen.feed.TemplateMCQModalMvpView
11 import io.realm.Realm
12
13 class TemplateModalPresenter(val repository: TemplateDetailDataRepository = TemplateDetailDataRepository()) : BasePresenter<TemplateMCQModalMvpView>() {
14
15 private val feedItemsRepository = FeedItemsRepository(Realm.getDefaultInstance())
16
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/presenter/healthwallet/HealthWalletPresenter.kt:27:13Line detected, which is longer than the defined maximum line length in the code style.
24 showSavePdfIcon()
25 }
26
27 rxCard.sections?.let { items -> items.filter { it.type != null && (it.textToDisplay != null || it.titleToDisplay != null) } }?.let {
28 showList(it)
29 }
30 hideLoader()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/presenter/healthwallet/WalletAnalytics.kt:100:9Line detected, which is longer than the defined maximum line length in the code style.
97 internal fun reportShowInsuranceCardPage(walletCard: Any?, id: String?) {
98 val pageName = when (walletCard) {
99 is InsuranceCardWalletCard -> "${walletCard.group.capitalize()} - ${replaceHyphen(walletCard.type)} - $id"
100 is AnthemWalletCard -> "${walletCard.group.capitalize()} - ${replaceHyphen(walletCard.type)} - ${walletCard.title}"
101 is RxWalletCard -> "${walletCard.group.capitalize()} - ${replaceHyphen(walletCard.type)} - ${walletCard.title}"
102 else -> ""
103 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/presenter/inAppNotification/InAppNotificationModalPresenter.kt:11:1Line detected, which is longer than the defined maximum line length in the code style.
8 import com.sharecare.realgreen.notificationcenter.repository.NotificationCenterRepository
9 import com.sharecare.realgreen.screen.inAppNotification.InAppNotificationModalMVPView
10
11 class InAppNotificationModalPresenter(private val repository: NotificationCenterRepository = globalInjection().get()) : MvpPresenter<InAppNotificationModalMVPView>() {
12
13 override fun onViewAttached() {
14 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/presenter/phr/healthprofile/HealthProfilePresenter.kt:12:1Line detected, which is longer than the defined maximum line length in the code style.
9 import io.reactivex.disposables.Disposable
10
11
12 class HealthProfilePresenter(private val repository: PHRDetailedRepository, dependentId: String?) : BasePresenter<HealthProfileMvpView>() {
13 private var remoteSubscription: Disposable? = null
14
15 private fun hideLoader(firstTime: Boolean) = mvpView?.run {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/presenter/phr/healthprofile/PHRAllergiesAddPresenter.kt:9:1Line detected, which is longer than the defined maximum line length in the code style.
6 import com.sharecare.realgreen.screen.phr.detail.IPHRAllergiesAddView
7
8
9 class PHRAllergiesAddPresenter(dependentId: String? = null) : PHRBaseAddPresenter<HPAllergyResult, IPHRAllergiesAddView>(dependentId) {
10
11 private var severity = HPAllergySeverity.MODERATE
12
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/presenter/phr/healthprofile/PHRAllergiesComboHistoryPresenter.kt:14:1Line detected, which is longer than the defined maximum line length in the code style.
11 import java.lang.RuntimeException
12
13
14 class PHRAllergiesComboHistoryPresenter(dependentId: String? = null) : PHRListPresenter<HPAllergyResult, HPAllergiesSection, IPHRAllergiesComboHistoryView>(dependentId) {
15 private lateinit var sectionData: HPAllergiesSection
16
17 private var mostRecentRecord: HPAllergyResult? = null
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/presenter/phr/healthprofile/PHRAllergiesListPresenter.kt:12:1Line detected, which is longer than the defined maximum line length in the code style.
9 class HPAllergiesSection(hpRecord: HPAllergyResult?, ciDetailData: CICipDetailData?)
10 : HPDetailedSection<HPAllergyResult, CICipDetailData>(hpRecord, ciDetailData)
11
12 class PHRAllergiesListPresenter(dependentId: String? = null) : PHRSectionListPresenter<HPAllergyResult, HPAllergiesSection>(dependentId) {
13
14 override fun getSingleList(start: Int) = PHRListRequest(
15 repository.getHpAllergies(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/presenter/phr/healthprofile/PHRAllergiesListPresenter.kt:24:5Line detected, which is longer than the defined maximum line length in the code style.
21 currentPageSize
22 )
23
24 override fun getExtrasComposedList(codes: List<List<CIMedicationCode>>, hpRecords: List<HPAllergyResult>) = repository.getCiCipDetails(sectionCategory, codes)
25 .map { detailResults ->
26 detailResults.map {
27 HPAllergiesSection(findMatchedHpRecord(it.result.matchCode, hpRecords), it.result)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/presenter/phr/healthprofile/PHRBaseAddPresenter.kt:15:1Line detected, which is longer than the defined maximum line length in the code style.
12 import io.reactivex.Single
13
14
15 abstract class PHRBaseAddPresenter<H: HPResult, IView: IPHRBaseAddView>(dependentId: String?): PHRSectionPresenter<IView>(dependentId) {
16
17 private lateinit var suggestedData: CICipSuggestionData
18
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/presenter/phr/healthprofile/PHRBiometricsAddPresenter.kt:223:5Line detected, which is longer than the defined maximum line length in the code style.
220 }
221 }
222
223 private fun getProfileForMeasurement(code: String, codeSystem: String, measurementSystem: CIBiometricsMeasurementSystem) = measurements.first {
224 it.code.code.equals(code, true) && it.code.codeSystem.equals(codeSystem, true)
225 }.measurementProfiles.first {
226 it.measurementSystem == measurementSystem
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/presenter/phr/healthprofile/PHRBiometricsAddPresenter.kt:237:13Line detected, which is longer than the defined maximum line length in the code style.
234 it.observationDate = currentDate
235
236 val localProfile = getProfileForMeasurement(it.code!!, it.codeSystem!!, localMeasurementSystem)
237 val metricProfile = getProfileForMeasurement(it.code!!, it.codeSystem!!, CIBiometricsMeasurementSystem.METRIC)
238
239 applyToView {
240 val localValue = getMeasurementValue(it.code!!, it.codeSystem!!)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/presenter/phr/healthprofile/PHRBiometricsDashboardPresenter.kt:33:1Line detected, which is longer than the defined maximum line length in the code style.
30 get() = ciMeasurement!!.description
31 }
32
33 class PHRBiometricsDashboardPresenter(dependentId: String? = null) : PHRSectionPresenter<IPHRBiometricsDashboardView>(dependentId) {
34
35 enum class FilterSourceType(val nameResId: Int, val fieldVal: String?) {
36 ALL(R.string.biometrics_filter_show_all, null),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/presenter/phr/healthprofile/PHRBiometricsDashboardPresenter.kt:95:25Line detected, which is longer than the defined maximum line length in the code style.
92 filterSourceType.fieldVal,
93 dependentId
94 ),
95 BiFunction<List<CIBiometricsCategory>, List<HPBiometricResult>, List<HPBiometricsSection>> { categoryResult, hpResult ->
96 composeMeasurements(categoryResult, hpResult)
97 }).zipWithCompletable(
98 repository.resetSectionCountRemotely(sectionCategory, dependentId),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/presenter/phr/healthprofile/PHRBiometricsDashboardPresenter.kt:119:5Line detected, which is longer than the defined maximum line length in the code style.
116 }
117 }
118
119 private fun composeMeasurements(categories: List<CIBiometricsCategory>, biometrics: List<HPBiometricResult>) = ArrayList<HPBiometricsSection>().apply {
120 categories.forEach { category ->
121 add(HPBiometricsSection(null, null, category.code.name))
122 category.measurements.forEach { measurement ->
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/presenter/phr/healthprofile/PHRBiometricsHistoryPresenter.kt:9:1Line detected, which is longer than the defined maximum line length in the code style.
6 import com.sharecare.realgreen.tool.PHRBiometricsUtils.findKnownMeasurementByCodeAndCodeSystem
7
8
9 class PHRBiometricsHistoryPresenter(dependentId: String? = null) : PHRListPresenter<HPBiometricResult, HPBiometricsSection, IPHRBiometricsHistoryView>(dependentId) {
10
11 private lateinit var sectionData: HPBiometricsSection
12
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/presenter/phr/healthprofile/PHRCipHistoryListPresenter.kt:7:1Line detected, which is longer than the defined maximum line length in the code style.
4 import com.sharecare.realgreen.screen.phr.detail.IPHRCipHistoryListView
5
6
7 class PHRCipHistoryListPresenter(dependentId: String? = null) : PHRListPresenter<HPCipResult, HPCipSection, IPHRCipHistoryListView>(dependentId) {
8
9 private lateinit var sectionData: HPCipSection
10
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/presenter/phr/healthprofile/PHRCipListPresenter.kt:12:1Line detected, which is longer than the defined maximum line length in the code style.
9 class HPCipSection(hpRecord: HPCipResult?, ciDetailData: CICipDetailData?)
10 : HPDetailedSection<HPCipResult, CICipDetailData>(hpRecord, ciDetailData)
11
12 class PHRCipListPresenter(dependentId: String? = null) : PHRSectionListPresenter<HPCipResult, HPCipSection>(dependentId) {
13
14 override fun getSingleList(start: Int) = PHRListRequest(
15 repository.getHpCipRecords(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/presenter/phr/healthprofile/PHRCipListPresenter.kt:24:5Line detected, which is longer than the defined maximum line length in the code style.
21 ),
22 currentPageSize)
23
24 override fun getExtrasComposedList(codes: List<List<CIMedicationCode>>, hpRecords: List<HPCipResult>) = repository.getCiCipDetails(sectionCategory, codes)
25 .map { detailResults ->
26 detailResults.map {
27 HPCipSection(findMatchedHpRecord(it.result.matchCode, hpRecords), it.result)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/presenter/phr/healthprofile/PHRDetailedPresenter.kt:23:1Line detected, which is longer than the defined maximum line length in the code style.
20 import java.util.LinkedList
21
22
23 open class PHRDetailedPresenter<MVP : PHRDetailMvpView>(private val repository: DetailedHealthProfileRepository, private val dependentId: String? = null) : BasePresenter<MVP>() {
24 private lateinit var healthSectionResetObservable: Completable
25 private var healthSectionsObservable: Single<List<HealthSection>>? = null
26
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/presenter/phr/healthprofile/PHRDetailedPresenter.kt:53:13Line detected, which is longer than the defined maximum line length in the code style.
50
51 if (healthSectionsObservable != null) {
52 mvpView.showLoader()
53 addDisposable(healthSectionsObservable!!.zipWithCompletable(healthSectionResetObservable, BiFunction<List<HealthSection>, String, List<HealthSection>> { healthSections, _ ->
54 healthSections
55 })
56 .doOnSuccess { healthSections ->
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/presenter/phr/healthprofile/PHRDetailedPresenter.kt:107:48Line detected, which is longer than the defined maximum line length in the code style.
104 }
105
106 protected open fun initializeHealthRecords(healthSections: List<HealthSection>,
107 healthRecordType: HealthRecordType, healthRecords: MutableList<RealmObject>) {
108 for (healthSection in healthSections) {
109 val healthRecord = HealthRecord()
110
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/presenter/phr/healthprofile/PHREditPresenter.kt:32:1Line detected, which is longer than the defined maximum line length in the code style.
29 import kotlin.collections.ArrayList
30
31
32 class PHREditPresenter(private val repository: DetailedPHREditRepository, private val dependentId: String? = null) : PHRDetailedPresenter<PHREditFragmentMvpView>(repository, dependentId) {
33 private var healthSections: MutableList<HealthSection>? = null
34 private var healthSectionsObservable: Single<List<HealthSection>>? = null
35 private var synthesisPhysicians: MutableList<SynthesisPhysician>? = null
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/presenter/phr/healthprofile/PHREditPresenter.kt:75:17Line detected, which is longer than the defined maximum line length in the code style.
72 HealthCategory.BIOMETRICS -> repository.deleteBiometricEntryRemotely(deleteModel, id, dependentId)
73 HealthCategory.LAB_TESTS -> repository.deleteLabTestsEntryRemotely(deleteModel, id, dependentId)
74 HealthCategory.CONDITIONS -> repository.deleteConditionsEntryRemotely(deleteModel, id, dependentId)
75 HealthCategory.IMMUNIZATIONS -> repository.deleteImmunizationsEntryRemotely(deleteModel, id, dependentId)
76 HealthCategory.MEDICATIONS -> repository.deleteMedicationsEntryRemotely(deleteModel, id, dependentId)
77 HealthCategory.PROCEDURES -> repository.deleteProceduresEntryRemotely(deleteModel, id, dependentId)
78 else -> null
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/presenter/phr/healthprofile/PHREditPresenter.kt:247:9Line detected, which is longer than the defined maximum line length in the code style.
244 }
245
246 private fun isFinishPagination(results: List<HealthSection>, category: HealthCategory): Boolean {
247 return (((category != HealthCategory.CARE_TEAMS) && (results.size < DEFAULT_ENTRIES_PER_PAGE)) || ((category == HealthCategory.CARE_TEAMS) && (careTeamLoadSize < DEFAULT_ENTRIES_PER_PAGE)))
248 }
249
250 private fun getRemoteSubscription(): Single<List<HealthSection>> {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/presenter/phr/healthprofile/PHREditPresenter.kt:304:9Line detected, which is longer than the defined maximum line length in the code style.
301 }
302 }
303 }
304 synthesisPhysicians = synthesisPhysicians!!.filter { it.physician != null }.filter { it.careTeam!!.type.equals("Provider") }.toMutableList()
305 }
306
307 private fun loadHealthProfile(start: Int, code: String?) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/presenter/phr/healthprofile/PHREditPresenter.kt:388:5Line detected, which is longer than the defined maximum line length in the code style.
385 }
386 }
387
388 override fun initializeHealthRecords(healthSections: List<HealthSection>, healthRecordType: HealthRecordType, healthRecords: MutableList<RealmObject>) {
389 for (healthSection in healthSections) {
390 val healthRecordHistory = HealthRecordHistory()
391
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/presenter/phr/healthprofile/PHRLabTestsHistoryListPresenter.kt:7:1Line detected, which is longer than the defined maximum line length in the code style.
4 import com.sharecare.realgreen.screen.phr.detail.IPHRLabTestsHistoryListView
5
6
7 class PHRLabTestsHistoryListPresenter(dependentId: String? = null) : PHRListPresenter<HPLabTestsResult, HPLabTestsSection, IPHRLabTestsHistoryListView>(dependentId) {
8
9 private lateinit var sectionData: HPLabTestsSection
10
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/presenter/phr/healthprofile/PHRLabTestsListPresenter.kt:12:1Line detected, which is longer than the defined maximum line length in the code style.
9 class HPLabTestsSection(hpRecord: HPLabTestsResult?, ciDetailData: CILabTestsDetailData?)
10 : HPDetailedSection<HPLabTestsResult, CILabTestsDetailData>(hpRecord, ciDetailData)
11
12 class PHRLabTestsListPresenter(dependentId: String? = null) : PHRSectionListPresenter<HPLabTestsResult, HPLabTestsSection>(dependentId) {
13
14 override fun getSingleList(start: Int) = PHRListRequest(
15 repository.getHpLabTests(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/presenter/phr/healthprofile/PHRLabTestsListPresenter.kt:23:5Line detected, which is longer than the defined maximum line length in the code style.
20 ),
21 currentPageSize)
22
23 override fun getExtrasComposedList(codes: List<List<CIMedicationCode>>, hpRecords: List<HPLabTestsResult>) = repository.getCiLabTestsDetails(codes)
24 .map { detailResults ->
25 detailResults.map {
26 HPLabTestsSection(findMatchedHpRecord(it.result.matchCode, hpRecords), it.result)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/presenter/phr/healthprofile/PHRListPresenter.kt:14:1Line detected, which is longer than the defined maximum line length in the code style.
11 import io.reactivex.Single
12
13
14 abstract class PHRListPresenter<H: HPResult, T: HPSection<H>, IView: IPHRListView<T>>(dependentId: String?) : PHRSectionPresenter<IView>(dependentId) {
15
16 protected open val fetchRecordsOnViewAttached = true
17
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/presenter/phr/healthprofile/PHRMedicationAddPresenter.kt:22:33Line detected, which is longer than the defined maximum line length in the code style.
19
20
21 class PHRMedicationAddPresenter(protected val medicationConfigurationRepository:
22 MedicationConfigurationRepository = MedicationConfigurationDataRepository(ConfigurationRepositoryImpl.provideToExternalModule()),
23 dependentId: String? = null) : PHRSectionPresenter<IPHRMedicationAddView>(dependentId) {
24
25
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/presenter/phr/healthprofile/PHRMedicationsListPresenter.kt:23:5Line detected, which is longer than the defined maximum line length in the code style.
20 import io.reactivex.functions.BiFunction
21
22 class PHRMedicationsListPresenter(
23 protected val medicationConfigurationRepository: MedicationConfigurationRepository = MedicationConfigurationDataRepository(ConfigurationRepositoryImpl.provideToExternalModule()),
24 private val origamiSharedPreferencesRepository: OrigamiSharedPreferencesRepository = OrigamiSharedPreferencesRepositoryImpl(Origami.sharedPreferences!!),
25 dependentId: String? = null) : PHRSectionListPresenter<HPMedicationResult, HPMedicationSection>(dependentId) {
26
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/presenter/phr/healthprofile/PHRMedicationsListPresenter.kt:24:5Line detected, which is longer than the defined maximum line length in the code style.
21
22 class PHRMedicationsListPresenter(
23 protected val medicationConfigurationRepository: MedicationConfigurationRepository = MedicationConfigurationDataRepository(ConfigurationRepositoryImpl.provideToExternalModule()),
24 private val origamiSharedPreferencesRepository: OrigamiSharedPreferencesRepository = OrigamiSharedPreferencesRepositoryImpl(Origami.sharedPreferences!!),
25 dependentId: String? = null) : PHRSectionListPresenter<HPMedicationResult, HPMedicationSection>(dependentId) {
26
27 override fun getSingleList(start: Int) = PHRListRequest(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/presenter/phr/healthprofile/PHRMedicationsListPresenter.kt:53:25Line detected, which is longer than the defined maximum line length in the code style.
50 AnalyticsCore
51 .action(GeneralAnalytics.Action.RG_REMOVE)
52 .customParam(GeneralAnalytics.State.ITEM_DETAIL, matchCode.brandType)
53 .customParam(GeneralAnalytics.State.ITEM, displayName + ScanMedicationAnalytics.Actions.ITEM_SUFFIX)
54 }
55
56 medicationConfigurationRepository.updateConfigurationAfterDeletion(item.hpRecord?.code!!)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/presenter/phr/healthprofile/PHRMedicationsListPresenter.kt:60:5Line detected, which is longer than the defined maximum line length in the code style.
57 origamiSharedPreferencesRepository.removeDashboardLastUpdatedMoment()
58 }!!
59
60 override fun getExtrasComposedList(codes: List<List<CIMedicationCode>>, hpRecords: List<HPMedicationResult>) = Single.zip(
61 repository.getCiMedicationsDetails(codes).withDefaultSchedulers(),
62 repository
63 .getCiMedicationsImages(MEDICATION_THUMBNAIL_SIZE, codes)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/presenter/phr/healthprofile/PHRMedicationsListPresenter.kt:77:5Line detected, which is longer than the defined maximum line length in the code style.
74 )
75 })
76
77 override fun sortByName(records: List<HPMedicationSection>) = records.sortedBy { it.ciMedicationDetailData.doseFormCode.name }
78
79 companion object {
80 private const val MEDICATION_THUMBNAIL_SIZE = 160
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/presenter/phr/healthprofile/PHRSectionListPresenter.kt:20:1Line detected, which is longer than the defined maximum line length in the code style.
17 import io.reactivex.functions.BiFunction
18
19
20 abstract class PHRSectionListPresenter<H : HPResult, T : HPSection<H>>(dependentId: String? = null) : PHRListPresenter<H, T, IPHRSectionListView<T>>(dependentId) {
21
22 // need to delay data fetching on order to set paging mode and display tutorial
23 override val fetchRecordsOnViewAttached = false
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/presenter/realage/RealAgeReportPresenter.kt:15:1Line detected, which is longer than the defined maximum line length in the code style.
12 import java.io.IOException
13
14
15 class RealAgeReportPresenter(val repository: RatReportRepository, var context: Context) : BasePresenter<RealAgeReportMvpView>() {
16
17 fun onClickViewFullReport() {
18 mvpView.showLoading()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/relationships/presentation/details/RelationshipDetailsChildFragment.kt:81:17Line detected, which is longer than the defined maximum line length in the code style.
78 AnalyticsUtilExtension.reportPage(requireContext(), GeneralAnalytics.Page.RELATIONSHIP_DETAILS,
79 GeneralAnalytics.MenuPage.HOME,
80 GeneralAnalytics.Page.RELATIONSHIP_DETAILS,
81 if (ContactsUtil.getRelationshipRecord(contact) != null) ContactsUtil.getRelationshipRecord(contact).intensity else 0, true)
82 }
83
84 override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/relationships/presentation/details/RelationshipDetailsChildFragment.kt:103:13Line detected, which is longer than the defined maximum line length in the code style.
100
101 override fun onCreateListHeaderView(): View? {
102 val toggleDetailsRunnable = Runnable {
103 if (ContactsUtil.getRelationshipRecord(contact) != null && ContactsUtil.getRelationshipRecord(contact).numOfCalls > 0) {
104 RelationshipStressStatsActivity.start(requireContext(), contactWrapper)
105 }
106 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/relationships/presentation/list/RelationshipAdapter.kt:56:13Line detected, which is longer than the defined maximum line length in the code style.
53 val contactsWithDisplayNames = contacts.filter {
54 it.nameGroupId != Contact.GROUP_UNKNOWN_NUMBER
55 }.sortedWith(object : Comparator<Contact> {
56 override fun compare(lhs: Contact, rhs: Contact) = lhs.nameGroupId.compareTo(rhs.nameGroupId, ignoreCase = true)
57 })
58
59 val contactsWithoutDisplayNames = contacts.filter { it.nameGroupId == Contact.GROUP_UNKNOWN_NUMBER }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/relationships/presentation/list/RelationshipAdapter.kt:89:13Line detected, which is longer than the defined maximum line length in the code style.
86 val relationships = RelationshipRealmInteraction.getRelationshipRecords()
87 val contacts = ArrayList<Contact>()
88 for (record in relationships) {
89 if (!record.phoneNumber.isNullOrEmpty() && record.phoneNumber.matches(Constant.VALID_PHONE_NUMBER_RESTRICTION.toRegex())) {
90 val contact = ContactsUtil.getContact(context, record)
91 if (contact != null) {
92 if (!contacts.contains(contact)) { //needed to ensure that a relationship split to several numbers will be displayed once
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/relationships/presentation/list/RelationshipAdapter.kt:92:21Line detected, which is longer than the defined maximum line length in the code style.
89 if (!record.phoneNumber.isNullOrEmpty() && record.phoneNumber.matches(Constant.VALID_PHONE_NUMBER_RESTRICTION.toRegex())) {
90 val contact = ContactsUtil.getContact(context, record)
91 if (contact != null) {
92 if (!contacts.contains(contact)) { //needed to ensure that a relationship split to several numbers will be displayed once
93 contacts.add(contact)
94 }
95
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/relationships/presentation/list/RelationshipAdapter.kt:96:21Line detected, which is longer than the defined maximum line length in the code style.
93 contacts.add(contact)
94 }
95
96 L.d(String.format("Rel: %s | Con: %s | D: %s ", record.phoneNumber, contact.phoneNumber, contact.displayName))
97 }
98 }
99 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/relationships/presentation/list/RelationshipViewHolder.kt:43:9Line detected, which is longer than the defined maximum line length in the code style.
40 fun bindTo(contact: Contact) {
41 this.contact = contact
42 val context = binding.root.context
43 val isNotUnknown = ContactsUtil.getContactDisplayName(context, contact) != context.resources.getString(R.string.unknown_number)
44 itemClicable = contact.isAggregation || isNotUnknown
45
46 if (contact.isAggregation) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/relationships/presentation/list/RelationshipViewHolder.kt:64:25Line detected, which is longer than the defined maximum line length in the code style.
61 } else {
62 ContactThumbnailView(context).apply {
63 initialize(contact, contact.relationshipRecord.intensity,
64 resources.getDimensionPixelSize(R.dimen.spacing_xxxl), resources.getDimensionPixelSize(R.dimen.spacing_s), R.drawable.ic_tofu_avatar_empty)
65 }
66 }
67 binding.thumbnailLayout.addView(thumbnailView)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/relationships/presentation/list/RelationshipViewHolder.kt:71:9Line detected, which is longer than the defined maximum line length in the code style.
68 }
69
70 private fun makeFacelessAvatar(stressIntensity: Int): View {
71 val avatarDrawable = VectorDrawableCompat.create(itemView.resources, R.drawable.ic_tofu_relationships_circle, null)
72 val stressIntensityColorRes = ViewUtil.getStressIntensityColor(itemView.context, stressIntensity)
73 avatarDrawable!!.setTint(ContextCompat.getColor(itemView.context, stressIntensityColorRes))
74
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/relationships/presentation/root/RelationshipRootFragment.kt:26:13Line detected, which is longer than the defined maximum line length in the code style.
23 val realRelationshipsNumber = RelationshipRealmInteraction.getRelationshipRecords().size
24 val inaccessibleRelationshipExists = RelationshipRealmInteraction.getAggregationRelationship() != null
25
26 // So regardless of the CONTACTS permission, if there is only one relationship to show and it is 'inaccessible', display the details screen for it
27 if (realRelationshipsNumber == 0 && inaccessibleRelationshipExists) {
28 displayFragment(RelationshipDetailsChildFragment.makeAggregationInstance())
29 } else {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/repository/auth/registration/RegisterRepositoryImpl.kt:35:5Line detected, which is longer than the defined maximum line length in the code style.
32
33 override fun reportSkip(): Completable = eligibilityService().reportSkip()
34
35 override fun requestAndSaveConfiguration(market: Market) = RxWrapperUtil.create { configManager.requestAndSaveConfiguration(market) }
36
37 override fun doesAccountExist(email: String) = RxWrapperUtil.create<Boolean> { ssoService().accountExists(email) }
38
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/repository/auth/registration/RegisterRepositoryImpl.kt:39:5Line detected, which is longer than the defined maximum line length in the code style.
36
37 override fun doesAccountExist(email: String) = RxWrapperUtil.create<Boolean> { ssoService().accountExists(email) }
38
39 override val minAge = (configManager.getConfiguration().getFeatureConfiguration(FeatureConfigurationType.REGISTRATION) as RegistrationConfiguration).getMinimumAge()
40
41 override fun setUserNameSetting(name: String?) = setUserEmailSetting(name)
42
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/repository/maintenance/MaintenanceDataRepository.kt:20:17Line detected, which is longer than the defined maximum line length in the code style.
17
18 override fun checkServerMaintenance(): Single<MaintenancePageInfo> {
19 val maintenanceServiceEndpoint = EnvironmentOption.valueOf(PreferenceStore.getSharecareEnvKey()?.name
20 ?: EnvironmentOption.PRODUCTION.name).getConfigurationEndpointBasedOnMarket(PreferenceStore.getMarketSelection()
21 ?: MarketConfiguration.US)
22 val environmentBasicAuthorization = PreferenceStore.getSharecareEnvKey()?.basicAuth
23 ?: EnvironmentOption.PRODUCTION.basicAuth
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/repository/maintenance/MaintenanceDataRepository.kt:25:17Line detected, which is longer than the defined maximum line length in the code style.
22 val environmentBasicAuthorization = PreferenceStore.getSharecareEnvKey()?.basicAuth
23 ?: EnvironmentOption.PRODUCTION.basicAuth
24 val maintenanceService = MaintenanceService(createHttpClient(null, null, false, false, null, null),
25 maintenanceServiceEndpoint!!, getInterceptor(), getUserAgent(App.get()), Build.FINGERPRINT, environmentBasicAuthorization)
26 .setSupportedLocale(ConfigurationManager().supportedLocale);
27 return maintenanceService.checkMaintenance()
28 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/repository/phr/healthprofile/HealthProfileDataRepository.kt:16:1Line detected, which is longer than the defined maximum line length in the code style.
13 /**
14 * Repository for Health Profile screen with data stores
15 */
16 class HealthProfileDataRepository(private val dependentId: String? = null) : RatScreenDeciderDataRepository(), PHRDetailedRepository {
17
18 private val service by lazy {
19 ServiceFactory.getInstance()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/repository/phr/healthprofile/HealthProfileDataRepository.kt:24:13Line detected, which is longer than the defined maximum line length in the code style.
21 }
22
23 override fun getHealthCategoryCountRemotely(category: HealthCategory, sourceType: String?) =
24 service.getSectionCount(category.hpApiPath(), category.wantsNormalized, sourceType).map { HealthCategoryCount(category, it) }
25
26 override fun isPHRTutorialDisplayed(): Boolean {
27 return PreferenceStore.isPHRTutorialDisplayed()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/repository/realage/RatDataRepository.kt:9:5Line detected, which is longer than the defined maximum line length in the code style.
6 import io.reactivex.Single
7
8 class RatDataRepository : RatRepository {
9 private val service = ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.REALAGE_SHARECARE) as RealAgeService
10 override fun getAssessmentCompleted(after: Long): Single<List<AssessmentHistory>> {
11 return service.getAssessmentsHistory(after)
12 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/repository/realage/RatRpRepository.kt:15:9Line detected, which is longer than the defined maximum line length in the code style.
12 override fun getPDFReport(): Single<Response<ResponseBody>> {
13 val utcOffsetHours = DateUtil.getHourUTCTimeZone()
14 val utcOffsetMinutes = DateUtil.getMinuteUTCTimeZone()
15 var server = ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.REALAGE_SHARECARE) as RealAgeService
16 return server.getRealAgePDFReport(utcOffsetHours, utcOffsetMinutes)
17
18 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/auth/LoginRegisterSelectorActivity.kt:87:17Line detected, which is longer than the defined maximum line length in the code style.
84 super.onResume()
85 if (BuildConfig.DEBUG) {
86 binding.debugSubtitle.text =
87 "${(PreferenceStore.getSharecareEnvKey() ?: EnvironmentOption.PRODUCTION).name} – ${(PreferenceStore.getMarketSelection() ?: MarketConfiguration.US).name}"
88 }
89 }
90
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/auth/LoginRegisterSelectorActivity.kt:316:17Line detected, which is longer than the defined maximum line length in the code style.
313 }
314 if (!maintenancePageInfo.url.isNullOrEmpty()) {
315 deeplink.text = maintenancePageInfo.url
316 deeplink.setText(Html.fromHtml("<a href=" + maintenancePageInfo.url + ">" + maintenancePageInfo.url + "</a>"))
317 deeplink.setOnClickListener {
318 val intent = Intent(Intent.ACTION_VIEW, Uri.parse(maintenancePageInfo.url))
319
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/auth/loginRegisterSelector/presenter/LoginRegisterSelectorPresenter.kt:10:1Line detected, which is longer than the defined maximum line length in the code style.
7 import com.sharecare.realgreen.repository.maintenance.MaintenanceDataRepository
8 import com.sharecare.realgreen.screen.auth.loginRegisterSelector.ui.LoginRegisterSelectorView
9
10 class LoginRegisterSelectorPresenter(private val repository: MaintenanceDataRepository) : MvpPresenter<LoginRegisterSelectorView>() {
11
12 private var isAppLaunchedOnBrowser = false
13
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/auth/login/presenter/LoginPresenter.kt:53:25Line detected, which is longer than the defined maximum line length in the code style.
50 }
51 }
52 }) { error ->
53 AnalyticsCore.error(GeneralAnalytics.Action.CONFIG_ERROR, error.toString(), DebugAnalytics.CONFIGURATION_ERROR)
54 hideLoading()
55 showLoginError(error)
56 })
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/auth/login/ui/LoginActivity.kt:87:9Line detected, which is longer than the defined maximum line length in the code style.
84 private fun handleKeyboardAnimation(open: Boolean) {
85 val alpha1 = 0F
86 val alpha2 = 1F
87 val adjustPositionValue = 70F // adjusting the layout position at the top of the screen after the image moves out of the screen
88 if (open) {
89 with(binding) {
90 this.backgroundImage.height.toFloat().let {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/auth/onboarding/field/FieldView.kt:10:2Line detected, which is longer than the defined maximum line length in the code style.
7 /**
8 * Interface to be implemented by custom views for onboarding list of fields.
9 *
10 * Each view must implement horizontal margin by its own, since there can be different inner padding in different components.
11 * The vertical margin is set automatically to be 16dp
12 */
13 interface FieldView {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/auth/onboarding/field/OnboardingActivityFieldFactory.kt:17:17Line detected, which is longer than the defined maximum line length in the code style.
14 FieldTypes.CHECKBOX_INPUT -> CheckBoxFieldView(activity)
15 FieldTypes.MODAL_TEXT -> ModalTextFieldView(activity)
16 FieldTypes.TEXT -> TextFieldView(activity)
17 else -> throw RuntimeException("Not supported type. Check type with FieldFactory.isTypeSupported() before creating a field")
18 } as FieldView).apply {
19 setAttributes(field.attributes)
20 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/auth/onboarding/intro/OnboardingIntroActivity.kt:17:9Line detected, which is longer than the defined maximum line length in the code style.
14 override fun onCreate(savedInstanceState: Bundle?) {
15 super.onCreate(savedInstanceState)
16
17 val binding = DataBindingUtil.setContentView<ActivityOnboardingIntroBinding>(this, R.layout.activity_onboarding_intro)
18 binding.signOut.setOnClickListener {
19 logout()
20 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/auth/password/current/presenter/CurrentPasswordPresenter.kt:36:25Line detected, which is longer than the defined maximum line length in the code style.
33 hideLoading()
34 when {
35 ssoError?.isUserLocked() == true -> navigateToLockPage()
36 e is RemoteException && e.code == RemoteException.ErrorCode.PASSWORD_CHANGE_NEEDED -> moveToUpdatePasswordFragment(
37 password
38 )
39 else -> setError()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/auth/password/current/ui/CurrentPasswordFragment.kt:31:1Line detected, which is longer than the defined maximum line length in the code style.
28 import com.sharecare.realgreen.screen.auth.password.current.presenter.CurrentPasswordPresenter
29 import com.sharecare.realgreen.screen.auth.password.flow.ui.ChangePasswordActivity
30
31 class CurrentPasswordFragment private constructor() : BaseMvpFragment<CurrentPasswordPresenter, CurrentPasswordMvpView>(), CurrentPasswordMvpView {
32 private lateinit var binding: FragmentChangePasswordCurrentBinding
33
34 override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/auth/password/flow/ui/ChangePasswordActivity.kt:26:1Line detected, which is longer than the defined maximum line length in the code style.
23 import com.sharecare.realgreen.tool.isVersionSupported
24 import com.sharecare.realgreen.util.securitypin.AppLockUtil
25
26 class ChangePasswordActivity : BaseMvpActivity<ChangePasswordPresenter, ChangePasswordMvpView>(), ChangePasswordMvpView {
27 private lateinit var binding: ActivityChangePasswordBinding
28
29 override fun onCreate(savedInstanceState: Bundle?) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/auth/password/lock/ui/PasswordLockActivity.kt:67:13Line detected, which is longer than the defined maximum line length in the code style.
64 LOCK,
65 NEED_HELP //TODO: to save dev time, product team decided to show the same page for the lock page and the need_help page https://zpl.io/VDJx4qJ
66 //TODO: only the title is different and the X-button is present in need_help
67 //TODO: Consider to replace "need_help" scenario with a separate activity with this UI https://zpl.io/29Q7D8y once time allows and product tells so
68 }
69
70 private const val EXTRA_EMAIL = "extra_email"
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/auth/password/update/ui/UpdatePasswordFragment.kt:26:1Line detected, which is longer than the defined maximum line length in the code style.
23 import com.sharecare.realgreen.screen.auth.password.update.presenter.UpdatePasswordPresenter
24 import com.sharecare.realgreen.screen.auth.password.view.ui.InternalPasswordInnerView.OnPasswordListener
25
26 class UpdatePasswordFragment() : BaseMvpFragment<UpdatePasswordPresenter, UpdatePasswordMvpView>(), UpdatePasswordMvpView {
27 private lateinit var binding: FragmentChangePasswordUpdateBinding
28
29 override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/auth/password/update/ui/UpdatePasswordFragment.kt:67:25Line detected, which is longer than the defined maximum line length in the code style.
64 override fun onFocusChange(id: Int) {
65 when (id) {
66 R.id.edit_text_password -> sendFieldCompleteEvent(GeneralAnalytics.FormField.NEW_PASSWORD)
67 R.id.edit_text_confirm_password -> sendFieldCompleteEvent(GeneralAnalytics.FormField.CONFIRM_PASSWORD)
68 }
69 }
70 })
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/auth/password/view/ui/PasswordRulesAdapter.kt:13:1Line detected, which is longer than the defined maximum line length in the code style.
10 import com.sharecare.realgreen.databinding.ItemPasswordRuleBinding
11 import com.sharecare.realgreen.screen.auth.password.view.model.PasswordRuleItem
12
13 class PasswordRulesAdapter(private var items: List<PasswordRuleItem> = listOf()) : RecyclerView.Adapter<RecyclerView.ViewHolder>() {
14
15 private var passwordInput: String? = null
16
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/auth/register/account/presenter/RegisterPresenter.kt:120:37Line detected, which is longer than the defined maximum line length in the code style.
117 applyToView {
118 setGlobalProgressVisible(false)
119 when {
120 e is RemoteException && e.codesArray?.contains("sso:bad-request:unknown_email") ?: false -> showEmailConfirmationDialog(account.email
121 ?: "")
122 e is RemoteException && e.codesArray?.contains("sso:bad-request:invalid_email") ?: false -> showInvalidEmailError()
123 else -> {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/auth/register/account/presenter/RegisterPresenter.kt:122:37Line detected, which is longer than the defined maximum line length in the code style.
119 when {
120 e is RemoteException && e.codesArray?.contains("sso:bad-request:unknown_email") ?: false -> showEmailConfirmationDialog(account.email
121 ?: "")
122 e is RemoteException && e.codesArray?.contains("sso:bad-request:invalid_email") ?: false -> showInvalidEmailError()
123 else -> {
124 clearPassword()
125 showAccountTakenError() //FIXME this a erroneous: why is this assumed?
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/auth/register/account/ui/RegisterActivity.kt:116:37Line detected, which is longer than the defined maximum line length in the code style.
113 val format = DateTimeFormat.forPattern("dd-MM-yyyy")
114 val birthDate = DateTime.parse(it, format)
115 birthday = birthDate
116 editTextBirthDate.setText(formatDate(birthDate, DateStyle.MEDIUM, TimeZone.getTimeZone("GMT")))
117 }
118 it["gender"]?.let {
119 val gender = Gender.fromString(it)!!
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/auth/register/account/ui/RegisterActivity.kt:254:13Line detected, which is longer than the defined maximum line length in the code style.
251
252 with(binding) {
253 genderDropdown.setDropDownBackgroundResource(R.color.surface)
254 val adapter: ArrayAdapter<String> = ArrayAdapter<String>(baseContext, R.layout.row_spn_left_dropdown, genderList)
255 genderDropdown.setAdapter(adapter)
256 genderDropdown.setOnItemClickListener { parent, view1, position, id ->
257 selectedGender = Gender.values()[position]
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/auth/register/account/ui/RegisterActivity.kt:500:17Line detected, which is longer than the defined maximum line length in the code style.
497 private fun makeFooterText(): String? {
498 val configuration = ConfigurationManager().getConfiguration()
499 val footersConfiguration =
500 configuration.getFeatureConfiguration(FeatureConfigurationType.LEGAL_FOOTER) as LegalFootersConfiguration
501 val legalFooters = StringBuilder()
502 for ((legalType, url) in footersConfiguration.getLegalFooters(this, false, false)) {
503 legalFooters.append(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/auth/register/country/presenter/CountrySearchPresenter.kt:16:17Line detected, which is longer than the defined maximum line length in the code style.
13 applyToView {
14 if (searchTerm.isNotEmpty()) {
15 setClearButtonVisibility(true)
16 setCountries(countryList.filter { it.name.startsWith(searchTerm, true) } as ArrayList<AlphabeticalAdapterItem<*>>)
17 } else {
18 setClearButtonVisibility(false)
19 setCountries(null)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/auth/reset/ResetActionSender.kt:20:9Line detected, which is longer than the defined maximum line length in the code style.
17 configurationManager.requestAndSaveConfiguration(email)
18 val configuration = configurationManager.getConfiguration()
19 val service = ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.SSO) as SSOServiceImpl
20 val resetPathLink = configuration.getNetworkConfiguration().getHostForFeature(NetworkConfigurationType.WEBAPP) + PASSWORD_RESET_LINK_PATH
21 val data = ResetPasswordData(TEMPLATE_ID, SUBJECT, PROVIDER, ResetPasswordAdditionalData(resetPathLink))
22 service.resetPassword(email, data)
23 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/auth/reset/ResetPasswordActivity.kt:136:33Line detected, which is longer than the defined maximum line length in the code style.
133 val intent = when (intent.getSerializableExtra(EXTRA_RESET_TYPE) as? ResetType) {
134 ResetType.FORGOT -> {
135 val intent = Intent(this, LoginActivity::class.java).apply {
136 addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP or Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK)
137 }
138 startActivity(intent)
139 finish()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/auth/reset/ResetPasswordActivity.kt:143:33Line detected, which is longer than the defined maximum line length in the code style.
140 }
141 ResetType.RESET -> {
142 if (Session.isSignIn()) {
143 NavHostActivity::class.start(this, MainGraphDirections.toSettings(), SettingsGraphDirections.toAccount())
144 } else {
145 val intent = Intent(this, LoginActivity::class.java).apply {
146 addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP or Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/auth/reset/ResetPasswordActivity.kt:146:37Line detected, which is longer than the defined maximum line length in the code style.
143 NavHostActivity::class.start(this, MainGraphDirections.toSettings(), SettingsGraphDirections.toAccount())
144 } else {
145 val intent = Intent(this, LoginActivity::class.java).apply {
146 addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP or Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK)
147 }
148 startActivity(intent)
149 finish()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/auth/territory/UserProfileFeatureCallbacks.kt:12:9Line detected, which is longer than the defined maximum line length in the code style.
9 class UserProfileFeatureCallbacks : FeatureCallbacks() {
10 override fun onIsAppEngaged() {
11 val invalidUserProfile = PreferenceStore.getUserName() == null
12 val lastRefreshOlderThanADay = System.currentTimeMillis() - PreferenceStore.getLastActiveMillis() > DateUtil.DAY_IN_MILLIS
13 val shouldRefresh = invalidUserProfile || lastRefreshOlderThanADay
14
15 if (shouldRefresh) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/avatar/AvatarFragment.kt:54:1Line detected, which is longer than the defined maximum line length in the code style.
51 var customLayoutId: Int = R.layout.fragment_avatar,
52 private val showInitialsAsImagePlaceHolder: Boolean = true,
53 var greetingStringId: Int = R.string.no_hello_user
54 ) : RxFragment<AvatarPresenter, AvatarMvpView>(), AvatarMvpView, AvatarOptionsClickListener, AccountUpdateListenerHolder {
55
56 lateinit var binding: AvatarViewReferences
57
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/avatar/AvatarFragment.kt:201:29Line detected, which is longer than the defined maximum line length in the code style.
198 RequestCode.PICK_IMAGE -> {
199 data?.data?.let { contentUri ->
200 try {
201 // We need to have different input streams one for creating bitmap and the other for getting Exif info
202 // Using same input stream yields no proper result
203 val inputStream = requireActivity().contentResolver.openInputStream(contentUri)
204 val avatar = ImageUtils.rotateIBitmap(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/avatar/AvatarFragment.kt:206:33Line detected, which is longer than the defined maximum line length in the code style.
203 val inputStream = requireActivity().contentResolver.openInputStream(contentUri)
204 val avatar = ImageUtils.rotateIBitmap(
205 inputStream,
206 BitmapFactory.decodeStream(requireActivity().contentResolver.openInputStream(contentUri))
207 )
208 presenter.uploadAvatar(avatar)
209 } catch (e: Exception) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/avatar/AvatarFragment.kt:248:5Line detected, which is longer than the defined maximum line length in the code style.
245 override fun hideProcessIndicator() {}
246
247 @SuppressLint("SetTextI18n")
248 private fun setAvatar(url: String?, firstName: String?, lastName: String?, initials: String, bearer: String? = null) {
249 avatarExists = url != null
250
251 presenter.apply {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/avatar/AvatarFragment.kt:264:9Line detected, which is longer than the defined maximum line length in the code style.
261 binding.avatarName.text = greetingString
262 }
263
264 binding.lastUpdated.text = resources.getString(R.string.updated_label, PreferenceStore.getRecentUpdatedDateTime())
265
266 val shouldDisplayImage = (binding.avatarInitials.text.isEmpty() || avatarExists) || !showInitialsAsImagePlaceHolder
267 showAvatarImage(shouldDisplayImage)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/avatar/AvatarFragment.kt:266:9Line detected, which is longer than the defined maximum line length in the code style.
263
264 binding.lastUpdated.text = resources.getString(R.string.updated_label, PreferenceStore.getRecentUpdatedDateTime())
265
266 val shouldDisplayImage = (binding.avatarInitials.text.isEmpty() || avatarExists) || !showInitialsAsImagePlaceHolder
267 showAvatarImage(shouldDisplayImage)
268
269 val loadDestination = LoadDestination.wrap(binding.avatarImage)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/avatar/AvatarFragment.kt:315:21Line detected, which is longer than the defined maximum line length in the code style.
312 if (PermissionsUtil.arePermissionsGranted(requireContext(), PermissionsUtil.PermissionValue.CAMERA)) {
313 openCamera(imageUri)
314 } else {
315 requestPermissions(PermissionsUtil.PermissionValue.CAMERA.permissionNames, PERMISSION_CAMERA_REQUEST_CODE)
316 }
317 }
318
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/avatar/AvatarPresenter.kt:19:1Line detected, which is longer than the defined maximum line length in the code style.
16 import io.reactivex.Completable
17
18
19 class AvatarPresenter(private val dependentId: String? = null, private val onInvalidProfile: (() -> Unit)? = null, private val enableShp: Boolean) : RxPresenter<AvatarMvpView>() {
20 private val repository = AvatarDataRepository()
21 private val accountRepository = LegacyAccountRepositoryImpl()
22 private val shpRepository = ShpRepository()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/avatar/AvatarPresenter.kt:68:5Line detected, which is longer than the defined maximum line length in the code style.
65
66 //FIXME -> lifecycle issue found. Catching the exception is a workaround to remove.
67 @Reminder("Lifecycle issue to fix...", Developer.David)
68 private fun presentMainProfileAlone(isChanged: Boolean) = inBackground(accountRepository.getAccount()) { account: Account ->
69 try {
70 applyToView {
71 refreshAvatar(account, isChanged)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/avatar/AvatarPresenter.kt:74:13Line detected, which is longer than the defined maximum line length in the code style.
71 refreshAvatar(account, isChanged)
72 }
73 }catch (e:Exception){
74 L.e("Exception caught while presenting main profile. There is a lifecycle issue with the RxPresent / AvatarPresenter.", e)
75 }
76 }
77
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/clickemail/ClickEmailActivity.kt:13:1Line detected, which is longer than the defined maximum line length in the code style.
10 import com.sharecare.realgreen.databinding.ActivityUpdateVersionPromptBinding
11 import com.sharecare.realgreen.presenter.webpage.ClickEmailPresenter
12
13 class ClickEmailActivity : AuthenticatedActivity<ClickEmailPresenter<ClickEmailMvpView>, ClickEmailMvpView>(), ClickEmailMvpView {
14
15 override fun onCreate(savedInstanceState: Bundle?) {
16 super.onCreate(savedInstanceState)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/feed/FeedItemLoaderFragment.kt:38:1Line detected, which is longer than the defined maximum line length in the code style.
35 import com.sharecare.realgreen.tool.realminteraction.whiteLabel
36
37
38 class FeedItemLoaderFragment : BaseMvpFragment<FeedItemLoaderPresenter, FeedItemLoaderMvpView>(), FeedItemLoaderMvpView {
39
40 override fun createPresenter() = FeedItemLoaderPresenter(this.getString(arguments, FEED_ID))
41
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/feed/FeedItemLoaderFragment.kt:61:17Line detected, which is longer than the defined maximum line length in the code style.
58 if (overrideTheCheck || isResumed) {
59 getNavigationController().popBack()
60 when (feed.itemType) {
61 ItemType.ARTICLE.id -> NavigatorCoreUtil.toArticleDetails(requireContext(), feed.getData(ArticleItemRecordData::class.java), null, feed, ArticleDetailsFragment())
62 ItemType.SLIDESHOW.id -> NavigatorCoreUtil.toSlideshowDetailedActivity(requireContext(), feed.contentId, null, feed, SlideshowDetailsFragment())
63 ItemType.VIDEO.id -> VideoPlayerFullscreenActivity.startWithSourceContentId(
64 context = requireContext(),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/feed/FeedItemLoaderFragment.kt:62:17Line detected, which is longer than the defined maximum line length in the code style.
59 getNavigationController().popBack()
60 when (feed.itemType) {
61 ItemType.ARTICLE.id -> NavigatorCoreUtil.toArticleDetails(requireContext(), feed.getData(ArticleItemRecordData::class.java), null, feed, ArticleDetailsFragment())
62 ItemType.SLIDESHOW.id -> NavigatorCoreUtil.toSlideshowDetailedActivity(requireContext(), feed.contentId, null, feed, SlideshowDetailsFragment())
63 ItemType.VIDEO.id -> VideoPlayerFullscreenActivity.startWithSourceContentId(
64 context = requireContext(),
65 sourceContentId = feed.getData(VideoItemRecordData::class.java)!!.sourceContentId)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/feed/FeedItemLoaderFragment.kt:71:17Line detected, which is longer than the defined maximum line length in the code style.
68 feed.serverId,
69 feed.isPinned,
70 feed.whiteLabel)
71 ItemType.IW_REPORT.id -> InsightWizardReportActivity.start(context, binding.root, feed.getData(IwReportsItemRecordData::class.java))
72 ItemType.TEMPLATE.id,
73 ItemType.SURVEY.id -> TemplateDetailFragment.start(requireContext(), feed.serverId, feed.groupInfo)
74 ItemType.CALL_SUMMARY.id -> "" //TODO: pending requirments for the call summary
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/feed/TemplateDetailFragment.kt:48:1Line detected, which is longer than the defined maximum line length in the code style.
45 import com.sharecare.realgreen.presenter.feed.item.TemplateDetailPresenter
46 import com.sharecare.realgreen.tool.realminteraction.getData
47
48 class TemplateDetailFragment : DynamicFeedDetailsFragment<TemplateDetailPresenter, TemplateDetailMvpView>(), FeedEventsHandler, TemplateDetailMvpView {
49
50 private lateinit var binding: ActivityTemplateDetailedViewContainerBinding
51
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/feed/TemplateDetailFragment.kt:57:9Line detected, which is longer than the defined maximum line length in the code style.
54 }
55
56 override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
57 binding = DataBindingUtil.inflate(inflater, R.layout.activity_template_detailed_view_container, container, false)
58 return binding.root
59 }
60
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/feed/TemplateDetailFragment.kt:132:17Line detected, which is longer than the defined maximum line length in the code style.
129 override fun requireNavigationController(): NavigationController? = getNavigationController()
130 override fun requireItemRecord(): ItemRecord? = presenter?.itemRecord
131 override fun requireInteractions(): TemplateInteractionApi? = object : TemplateInteractionApi {
132 override fun onSubmitSurveyAnswers(answer: SurveyAnswer, onSubmitFailed: () -> Unit, onSubmitSuccess: () -> Unit) {
133 presenter!!.submitAnswer(answer.apply { itemRecord = presenter?.itemRecord }, onSubmitFailed, onSubmitSuccess)
134 }
135
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/feed/TemplateDetailFragment.kt:133:21Line detected, which is longer than the defined maximum line length in the code style.
130 override fun requireItemRecord(): ItemRecord? = presenter?.itemRecord
131 override fun requireInteractions(): TemplateInteractionApi? = object : TemplateInteractionApi {
132 override fun onSubmitSurveyAnswers(answer: SurveyAnswer, onSubmitFailed: () -> Unit, onSubmitSuccess: () -> Unit) {
133 presenter!!.submitAnswer(answer.apply { itemRecord = presenter?.itemRecord }, onSubmitFailed, onSubmitSuccess)
134 }
135
136 override fun onRefreshClickListener(serverId: String?) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/feed/TemplateDetailFragment.kt:168:25Line detected, which is longer than the defined maximum line length in the code style.
165 override fun requireAnalyticsApi() = object : TemplateAnalyticsApi {
166 override fun reportAnalyticsForFirstOptionAction(attributes: TemplateAttributes, markEngaged: Boolean) {
167 if (requireItemRecord()?.serverId != null) {
168 TemplateFeedAnalyticsHelper.reportAnalyticsForFirstOptionAction(attributes, requireRootAnalytics(), requireImpressionsHandler(),
169 requireItemRecord(), NO_CARD_POSITION)
170 if (markEngaged)
171 FeedItemAnalytics.updateItemInteraction(requireItemRecord()!!)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/feed/TemplateDetailFragment.kt:175:17Line detected, which is longer than the defined maximum line length in the code style.
172 }
173 }
174
175 override fun reportAnalyticsForSecondOptionAction(attributes: TemplateAttributes, markEngaged: Boolean) {
176 if (presenter?.itemRecord?.serverId != null) {
177 TemplateFeedAnalyticsHelper.reportAnalyticsForSecondOptionAction(attributes, requireRootAnalytics(), requireImpressionsHandler(),
178 requireItemRecord(), NO_CARD_POSITION)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/feed/TemplateDetailFragment.kt:177:25Line detected, which is longer than the defined maximum line length in the code style.
174
175 override fun reportAnalyticsForSecondOptionAction(attributes: TemplateAttributes, markEngaged: Boolean) {
176 if (presenter?.itemRecord?.serverId != null) {
177 TemplateFeedAnalyticsHelper.reportAnalyticsForSecondOptionAction(attributes, requireRootAnalytics(), requireImpressionsHandler(),
178 requireItemRecord(), NO_CARD_POSITION)
179 if (markEngaged)
180 FeedItemAnalytics.updateItemInteraction(requireItemRecord()!!)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/feed/TemplateDetailFragment.kt:186:25Line detected, which is longer than the defined maximum line length in the code style.
183
184 override fun reportClickCardFromRootAnalytics() {
185 if (requireItemRecord() != null && requireItemRecord()!!.serverId != null) {
186 TemplateFeedAnalyticsHelper.reportClickCardFromRootAnalytics(requireRootAnalytics()!!, NO_CARD_POSITION,
187 requireItemRecord()!!.groupId, requireItemRecord()!!.serverId)
188 }
189 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/feed/TemplateDetailFragment.kt:192:21Line detected, which is longer than the defined maximum line length in the code style.
189 }
190
191 override fun reportAnalyticsForTapAction(attributes: TemplateAttributes, markEngaged: Boolean) {
192 TemplateFeedAnalyticsHelper.reportAnalyticsForTapAction(attributes, requireRootAnalytics(), requireImpressionsHandler(),
193 requireItemRecord(), NO_CARD_POSITION)
194 if (markEngaged)
195 FeedItemAnalytics.updateItemInteraction(requireItemRecord()!!)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/feed/TemplateDetailFragment.kt:199:21Line detected, which is longer than the defined maximum line length in the code style.
196 }
197
198 override fun reportAnalyticsForFirstButtonAction(attributes: TemplateAttributes) {
199 TemplateFeedAnalyticsHelper.reportAnalyticsForFirstButtonAction(attributes, requireRootAnalytics(), requireImpressionsHandler(),
200 requireItemRecord(), NO_CARD_POSITION)
201 }
202
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/feed/TemplateDetailFragment.kt:204:21Line detected, which is longer than the defined maximum line length in the code style.
201 }
202
203 override fun reportAnalyticsForSecondButtonAction(attributes: TemplateAttributes) {
204 TemplateFeedAnalyticsHelper.reportAnalyticsForSecondButtonAction(attributes, requireRootAnalytics(), requireImpressionsHandler(),
205 requireItemRecord(), NO_CARD_POSITION)
206 }
207
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/feed/TemplateDetailFragment.kt:209:21Line detected, which is longer than the defined maximum line length in the code style.
206 }
207
208 override fun reportAnalyticsForPinMenuAction(attributes: TemplateAttributes, markEngaged: Boolean) {
209 TemplateFeedAnalyticsHelper.reportAnalyticsForPinMenuAction(attributes, requireRootAnalytics(), requireImpressionsHandler(),
210 requireItemRecord(), NO_CARD_POSITION)
211 if (markEngaged)
212 FeedItemAnalytics.updateItemInteraction(requireItemRecord()!!)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/feed/TemplateDetailFragment.kt:216:21Line detected, which is longer than the defined maximum line length in the code style.
213 }
214
215 override fun reportAnalyticsForShareMenuAction(attributes: TemplateAttributes, markEngaged: Boolean) {
216 TemplateFeedAnalyticsHelper.reportAnalyticsForShareMenuAction(attributes, requireRootAnalytics(), requireImpressionsHandler(),
217 requireItemRecord(), NO_CARD_POSITION)
218 if (markEngaged)
219 FeedItemAnalytics.updateItemInteraction(requireItemRecord()!!)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/feed/TemplateDetailFragment.kt:223:21Line detected, which is longer than the defined maximum line length in the code style.
220 }
221
222 override fun reportAnalyticsForMcqSubmitAction(attributes: TemplateAttributes, answer: String) {
223 TemplateFeedAnalyticsHelper.reportAnalyticsForMcqSubmitAction(attributes, requireRootAnalytics(), requireImpressionsHandler(),
224 requireItemRecord(), NO_CARD_POSITION, answer)
225 }
226 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/feed/TemplateMCQModalActivity.kt:26:1Line detected, which is longer than the defined maximum line length in the code style.
23 import com.sharecare.realgreen.tool.realminteraction.getData
24
25
26 class TemplateMCQModalActivity : BaseActivity<TemplateModalPresenter, TemplateMCQModalMvpView>(), TemplateMCQModalMvpView {
27
28 private lateinit var binding: ActivityTemplateMcqModalBinding
29
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/feed/TemplateMCQModalActivity.kt:51:17Line detected, which is longer than the defined maximum line length in the code style.
48 initToolbar()
49 TemplateWidget(
50 containerType = TemplateContainerType.DETAIL,
51 template = component.getTemplateComponentByName(TemplateAttributeName.RESULT_CONTEXT.value) ?: component,
52 api = TemplateApiImpl(component),
53 ).inflateRecursively(binding.bodyContainer)
54 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/feed/item/enhancement/ImageFullscreenFragment.kt:33:13Line detected, which is longer than the defined maximum line length in the code style.
30 putString(IMAGE_URL, imageUrl)
31 }
32 }
33 (context as NavigationProvider).getNavigationController().goToNextFragment(fragment, replaceInContainer = false)
34 }
35 }
36
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/feed/stress/StressStatsActivity.kt:44:9Line detected, which is longer than the defined maximum line length in the code style.
41 return
42 }
43
44 val intensitiesByWeight = CollectionsUtil.mapOrderedByKeys<Int, Double>(voiceSummary.callTimeInSecPerStressIntensity, Integer.MAX_VALUE, false)
45
46 initChart(intensitiesByWeight, voiceSummary)
47
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/feed/stress/StressStatsActivity.kt:63:13Line detected, which is longer than the defined maximum line length in the code style.
60 val values = ArrayList<SliceValue>()
61 for (intensity in intensitiesByWeight) {
62 val value = SliceValue()
63 value.value = (voiceSummary.callTimeInSecPerStressIntensity[intensity]!! / voiceSummary.totalCallTimeInSeconds!!.toInt()).toFloat()
64 value.color = resources.getColor(ViewUtil.getStressIntensityColor(this, intensity))
65 values.add(value)
66 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/feed/stress/StressStatsActivity.kt:74:9Line detected, which is longer than the defined maximum line length in the code style.
71
72 private fun initWave(voiceSummary: VoiceStatus) {
73 val wave = ImageView(this)
74 val waveLayoutParams = RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT)
75 waveLayoutParams.addRule(RelativeLayout.CENTER_IN_PARENT)
76 wave.layoutParams = waveLayoutParams
77 wave.setImageDrawable(ViewUtil.getIntensityWaveDrawable(this,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/feed/stress/StressStatsActivity.kt:78:17Line detected, which is longer than the defined maximum line length in the code style.
75 waveLayoutParams.addRule(RelativeLayout.CENTER_IN_PARENT)
76 wave.layoutParams = waveLayoutParams
77 wave.setImageDrawable(ViewUtil.getIntensityWaveDrawable(this,
78 MathUtil.toInt(if (voiceSummary.avgStressIntensity == 0.0) 1.0 else voiceSummary.avgStressIntensity), false))
79 binding.chartThumbnailContainer.addView(wave)
80 }
81
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/feed/stress/StressStatsActivity.kt:89:13Line detected, which is longer than the defined maximum line length in the code style.
86 for (intensity in intensitiesByWeight) {
87 val vItem = inflater.inflate(R.layout.view_intensity_percent, null, true)
88 vItem.findViewById<View>(R.id.circle).setBackgroundDrawable(ViewUtil.getIntensityCircle(this, intensity!!))
89 (vItem.findViewById<View>(R.id.description) as TextView).text = ViewUtil.getRelationshipDescription(this, intensity)
90 val percent = if (index < intensitiesByWeight.size - 1)
91 MathUtil.toIntFromPercent(voiceSummary.callTimeInSecPerStressIntensity[intensity]!! / voiceSummary.totalCallTimeInSeconds!!)
92 else
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/feed/stress/StressStatsActivity.kt:91:17Line detected, which is longer than the defined maximum line length in the code style.
88 vItem.findViewById<View>(R.id.circle).setBackgroundDrawable(ViewUtil.getIntensityCircle(this, intensity!!))
89 (vItem.findViewById<View>(R.id.description) as TextView).text = ViewUtil.getRelationshipDescription(this, intensity)
90 val percent = if (index < intensitiesByWeight.size - 1)
91 MathUtil.toIntFromPercent(voiceSummary.callTimeInSecPerStressIntensity[intensity]!! / voiceSummary.totalCallTimeInSeconds!!)
92 else
93 MathUtil.MAX_PERCENT - sum
94 (vItem.findViewById<View>(R.id.percent) as TextView).text = "" + (if (percent > 0) percent else "<1") + "%"
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/healthwallet/AnthemCardDetailFragment.kt:34:1Line detected, which is longer than the defined maximum line length in the code style.
31 fun presentDownloadedMessage()
32 }
33
34 class AnthemCardDetailFragment : RxFragment<AnthemCardPresenter, AnthemCardDetailFragmentView>(), AnthemCardDetailFragmentView {
35 lateinit var binding: WalletCardDetailAnthemBinding
36
37 private val walletCard by lazy {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/healthwallet/AnthemCardDetailFragment.kt:84:5Line detected, which is longer than the defined maximum line length in the code style.
81 return AnthemCardPresenter(requireContext(), walletCard)
82 }
83
84 private fun attemptPdfDownload() = withPermissions(PermissionsUtil.PermissionValue.WALLET, R.string.wallet_storage_permission_request) {
85 presenter.downloadPdf(requireContext())
86 presentClarification(R.string.downloading)
87 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/healthwallet/AnthemCardDetailFragment.kt:92:1Line detected, which is longer than the defined maximum line length in the code style.
89 override fun presentDownloadedMessage() = presentClarification(R.string.downloaded)
90 }
91
92 class AnthemCardPresenter(context: Context, private val walletCard: AnthemWalletCard) : RxPresenter<AnthemCardDetailFragmentView>() {
93 private val repo = WalletRepository()
94 private val walletImageProvider = repo.buildImageProvider(context)
95
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/healthwallet/DisplayInsuranceCardSideFragment.kt:22:1Line detected, which is longer than the defined maximum line length in the code style.
19 import com.sharecare.realgreen.presenter.healthwallet.DisplayInsuranceCardSidePresenter
20
21
22 class DisplayInsuranceCardSideFragment : BaseFragment<DisplayInsuranceCardSidePresenter, DisplayInsuranceCardSideMvpView>(), DisplayInsuranceCardSideMvpView {
23 companion object {
24 private const val CARD_ITEM = "CARD_ITEM"
25 private const val VIEW = "VIEW"
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/healthwallet/HealthWalletListFragment.kt:52:1Line detected, which is longer than the defined maximum line length in the code style.
49 import java.util.concurrent.TimeUnit
50
51
52 class HealthWalletListFragment : RxFragment<HealthWalletListPresenter, HealthWalletListMvpView>(), HealthWalletListMvpView {
53 companion object {
54 const val PROMOTION_DELAY = 100L
55 const val CARD_LIMIT = 4
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/healthwallet/HealthWalletListFragment.kt:66:5Line detected, which is longer than the defined maximum line length in the code style.
63 }
64 }
65
66 private val insuranceCardFeatureEnabled = ConfigurationManager().getConfiguration().isFeatureEnabled(FeatureToggleType.INSURANCE_CARDS_ENABLED)
67 lateinit var settings: WalletSettings
68 lateinit var binding: FragmentHealthWalletListBinding
69
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/healthwallet/HealthWalletListFragment.kt:213:9Line detected, which is longer than the defined maximum line length in the code style.
210 val title = getString(R.string.insurance_card_promo)
211 val toolTipWallet = WalletTooltip(this)
212
213 val handler by lazy { CoroutineExceptionHandler { _, exception -> Log.e("TooltipHandler exception caught", exception.message!!) } }
214
215 toolTipWallet.provideScope().launch(Dispatchers.Main + handler) {
216 toolTipWallet.makeDialog(object : TooltipDialogApi {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/healthwallet/InsuranceCardFragment.kt:42:1Line detected, which is longer than the defined maximum line length in the code style.
39 import com.sharecare.realgreen.wallet.widgets.walletlist.cards.setSectionColor
40
41
42 class InsuranceCardFragment : RxFragment<InsuranceCardPresenter, InsuranceCardMvpView>(), InsuranceCardMvpView, ModalView {
43 companion object {
44 private const val TAKE_PICTURE_RESULT_CODE = 666
45 private const val CARD_FORM_FACTOR = 1.58
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/healthwallet/tooltip/TooltipWalletApi.kt:13:5Line detected, which is longer than the defined maximum line length in the code style.
10 interface TooltipWalletApi {
11 fun provideScope(): LifecycleCoroutineScope
12 fun provideActivity(): AppCompatActivity
13 fun makeDialog(api: TooltipDialogApi, targetView: View, item: TooltipItem, size: Int, index: Int): TooltipDialogAbstraction
14 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/healthwallet/tooltip/WalletTooltip.kt:29:9Line detected, which is longer than the defined maximum line length in the code style.
26 if (size != 1) bodyString += " (${index + 1}/${size})"
27 addBodyText(bodyString)
28 if (size != 1 && index != size - 1) skipButtonText(context.getString(R.string.btn_skip))
29 if (size == 1 || index == size - 1) actionButtonText(context.getString(R.string.btn_ok)) else actionButtonText(context.getString(R.string.btn_next))
30 }
31 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/inAppNotification/InAppNotificationModalActivity.kt:22:1Line detected, which is longer than the defined maximum line length in the code style.
19 import com.sharecare.realgreen.core.util.ViewCoreUtilJava
20 import com.sharecare.realgreen.presenter.inAppNotification.InAppNotificationModalPresenter
21
22 class InAppNotificationModalActivity : BaseMvpActivity<InAppNotificationModalPresenter, InAppNotificationModalMVPView>(), InAppNotificationModalMVPView {
23
24 private lateinit var binding: ModalContainerFragmentBinding
25
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/modal/ModalAnalytics.kt:38:13Line detected, which is longer than the defined maximum line length in the code style.
35 @Suppress("UNCHECKED_CAST")
36 private fun TemplateComponent.getAnalyticsMap(): LinkedTreeMap<String, Any>? {
37 val raw =
38 (this.attributes.map?.get(TemplateAttributeName.ANALYTICS.value) as MutableList<LinkedTreeMap<String, Any>>?)?.firstOrNull()
39 return raw?.entries?.firstOrNull { it.key == "data" }?.value as LinkedTreeMap<String, Any>?
40 }
41
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/modal/ModalConfig.kt:5:2Line detected, which is longer than the defined maximum line length in the code style.
2
3 /**
4 * Parameter class to configure modal communication screen functionalities
5 * TimeoutMs: Defines the maximum waiting time on app start to fetch a modal. On timeout we fall back to the default onboarding flow
6 * Reporting engagement can be turned off for debugging purposes
7 */
8 data class ModalConfig(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/modal/ModalFragment.kt:34:13Line detected, which is longer than the defined maximum line length in the code style.
31
32 override fun interceptNavigationAction(action: NavigationAction) =
33 if (action.type == NavigationAction.Type.BACK) {
34 //Proper navigation is handled by CTA button in Template we just need to remove current fragment from the stack
35 getNavigationController().removeFragmentFromStack(this)
36 true
37 } else false
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/modal/RemoteModalRepository.kt:38:6Line detected, which is longer than the defined maximum line length in the code style.
35 * Details:
36 * isEngaged = once engaged, always emit null
37 * noResult = fetch from remote yielded null or error, we don't re-fetch
38 * invalidated = if this state is set, the repository will always emit null results (this variable is useful for the deeplink special case)
39 * */
40 private var cachedModalId: String? = null
41 private var cachedResponse: ModalResponseItem? = null
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRAllergiesAddActivity.kt:64:9Line detected, which is longer than the defined maximum line length in the code style.
61
62 companion object {
63 @JvmStatic
64 fun makeInstance(data: CICipSuggestionData, dependentId: String? = null) = PHRAllergiesAddActivity(dependentId).apply {
65 arguments = Bundle().apply {
66 putSerializable(EXTRA_PHR_SECTION_META, PHRSectionMeta.ALLERGIES)
67 putSerializable(EXTRA_PHR_DATA, data)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRAllergiesComboHistoryActivity.kt:99:9Line detected, which is longer than the defined maximum line length in the code style.
96 }
97
98 private fun updateSeverity() {
99 val (severityColor, severityLabelResId) = PhrUtil.getTintColorAndLabelBySeverity(HPAllergySeverity.values()[currentSeverityIdx])
100 if (severityColor != 0) severityIcon.setTint(severityColor) else severityIcon.clearTint()
101 severityText.text = if (severityLabelResId != 0) getString(severityLabelResId) else ""
102 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRAllergiesSearchActivity.kt:16:1Line detected, which is longer than the defined maximum line length in the code style.
13 import com.sharecare.realgreen.util.analytics.phr.AllergiesAnalytics
14
15
16 class PHRAllergiesSearchActivity(dependentId: String? = null): PHRSearchActivity<CICipSuggestionData, PHRSuggestedCipItemHolder>(dependentId), TextView.OnEditorActionListener {
17
18 override fun onActivityCreated(savedInstanceState: Bundle?) {
19 super.onActivityCreated(savedInstanceState)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRAllergiesSectionListActivity.kt:15:1Line detected, which is longer than the defined maximum line length in the code style.
12 import com.sharecare.realgreen.util.analytics.phr.AllergiesAnalytics
13
14
15 class PHRAllergiesSectionListActivity(dependentId: String? = null) : PHRSectionListActivity<HPAllergyResult, HPAllergiesSection, PHRAllergiesItemHolder>(dependentId) {
16
17 override fun createPresenter() = PHRAllergiesListPresenter(dependentId)
18
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRAllergiesViewActivity.kt:10:1Line detected, which is longer than the defined maximum line length in the code style.
7 import com.sharecare.realgreen.presenter.phr.healthprofile.HPAllergiesSection
8
9
10 class PHRAllergiesViewActivity(dependentId: String?) : PHRTabHistoryInfoActivity<HPAllergyResult, HPAllergiesSection, PHRSectionMeta>(dependentId) {
11
12 override fun getHistoryListActivity() = PHRAllergiesComboHistoryActivity(dependentId)
13 override fun getItemInfoActivity() = PHRTabInfoActivity<HPAllergyResult, HPAllergiesSection>()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRAllergiesViewActivity.kt:18:9Line detected, which is longer than the defined maximum line length in the code style.
15
16 companion object {
17 @JvmStatic
18 fun makeInstance(data: HPAllergiesSection, dependentId: String? = null) = PHRAllergiesViewActivity(dependentId).apply {
19 arguments = Bundle().apply {
20 putSerializable(EXTRA_PHR_SECTION_META, PHRSectionMeta.ALLERGIES)
21 putSerializable(EXTRA_PHR_DATA, data)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRBaseAddActivity.kt:43:5Line detected, which is longer than the defined maximum line length in the code style.
40 // Only Allergies need to call analytic API when add item
41 }
42
43 override fun showItemWasAddedMessage() = showMessage(getString(R.string.phr_new_item_added, getString(phrSectionMeta.itemTitle)))
44
45 fun setupToolbar() {
46 super.setupToolbar(getString(R.string.btn_phr_detail_add,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRBiometricsAddActivity.kt:34:1Line detected, which is longer than the defined maximum line length in the code style.
31 fun onReadyForInput()
32 }
33
34 abstract class PHRBiometricsAddActivity(dependentId: String? = null): PHRSectionActivity<PHRBiometricsAddPresenter, IPHRBiometricsAddView,
35 PHRSectionMeta.BIOMETRICS>(dependentId), IPHRBiometricsAddView {
36
37 protected lateinit var itemTitle: TextView
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRBiometricsAddBMIActivity.kt:67:9Line detected, which is longer than the defined maximum line length in the code style.
64
65 companion object {
66 @JvmStatic
67 fun makeInstance(data: CIBiometricsMeasurement, dependentId: String?=null) = PHRBiometricsAddBMIActivity(dependentId).apply {
68 arguments = Bundle().apply {
69 putSerializable(EXTRA_PHR_SECTION_META, PHRSectionMeta.BIOMETRICS)
70 putSerializable(EXTRA_PHR_DATA, data)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRBiometricsAddBloodPressureActivity.kt:24:9Line detected, which is longer than the defined maximum line length in the code style.
21
22 override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
23 val layout = inflater.inflate(R.layout.activity_phr_biometrics_add_single, container, false)
24 inflater.inflate(R.layout.inline_phr_biometrics_blood_pressure_picker, layout.findViewById<LinearLayout>(R.id.picker_container))
25 return layout
26 }
27
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRBiometricsAddBloodPressureActivity.kt:61:9Line detected, which is longer than the defined maximum line length in the code style.
58
59 companion object {
60 @JvmStatic
61 fun makeInstance(data: CIBiometricsMeasurement, dependentId: String? = null) = PHRBiometricsAddBloodPressureActivity(dependentId).apply {
62 arguments = Bundle().apply {
63 putSerializable(EXTRA_PHR_SECTION_META, PHRSectionMeta.BIOMETRICS)
64 putSerializable(EXTRA_PHR_DATA, data)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRBiometricsAddHeightActivity.kt:19:9Line detected, which is longer than the defined maximum line length in the code style.
16
17 override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
18 val layout = inflater.inflate(R.layout.activity_phr_biometrics_add_single, container, false)
19 inflater.inflate(R.layout.inline_phr_biometrics_height_picker, layout.findViewById<LinearLayout>(R.id.picker_container))
20 return layout
21 }
22
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRBiometricsAddHeightActivity.kt:29:35Line detected, which is longer than the defined maximum line length in the code style.
26 }
27
28 override fun setupMeasurement(code: String, codeSystem: String, name: String, unit: String,
29 minValue: Double, maxValue: Double, iniValue: Double, decimalPlaces: Int) = with(heightPicker) {
30 setupHeightPicker(this, minValue, maxValue, iniValue)
31 setOnValueChangedListener { enableMenu(true) }
32 setOnValueChangingListener { enableMenu(false) }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRBiometricsAddHeightActivity.kt:39:9Line detected, which is longer than the defined maximum line length in the code style.
36
37 companion object {
38 @JvmStatic
39 fun makeInstance(data: CIBiometricsMeasurement, dependentId: String? = null) = PHRBiometricsAddHeightActivity(dependentId).apply {
40 arguments = Bundle().apply {
41 putSerializable(EXTRA_PHR_SECTION_META, PHRSectionMeta.BIOMETRICS)
42 putSerializable(EXTRA_PHR_DATA, data)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRBiometricsAddSingleActivity.kt:26:9Line detected, which is longer than the defined maximum line length in the code style.
23
24 override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
25 val layout = inflater.inflate(R.layout.activity_phr_biometrics_add_single, container, false)
26 inflater.inflate(R.layout.inline_phr_biometrics_single_picker, layout.findViewById<LinearLayout>(R.id.picker_container))
27 return layout
28 }
29
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRBiometricsAddSingleActivity.kt:54:9Line detected, which is longer than the defined maximum line length in the code style.
51
52 companion object {
53 @JvmStatic
54 fun makeInstance(data: CIBiometricsMeasurement, dependentId: String? = null) = PHRBiometricsAddSingleActivity(dependentId).apply {
55 arguments = Bundle().apply {
56 putSerializable(EXTRA_PHR_SECTION_META, PHRSectionMeta.BIOMETRICS)
57 putSerializable(EXTRA_PHR_DATA, data)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRBiometricsAddTotalHdlActivity.kt:54:9Line detected, which is longer than the defined maximum line length in the code style.
51
52 companion object {
53 @JvmStatic
54 fun makeInstance(data: CIBiometricsMeasurement, dependentId: String? = null) = PHRBiometricsAddTotalHdlActivity(dependentId).apply {
55 arguments = Bundle().apply {
56 putSerializable(EXTRA_PHR_SECTION_META, PHRSectionMeta.BIOMETRICS)
57 putSerializable(EXTRA_PHR_DATA, data)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRBiometricsHistoryActivity.kt:39:9Line detected, which is longer than the defined maximum line length in the code style.
36 override fun createAdapter() = PHRBiometricsListAdapter(true)
37
38 private fun showNonNormalizedWarningDialog() = activity?.supportFragmentManager?.let {
39 getNavigationController().goToNextFragment(FullscreenInformationDialog.newInstance(0, R.string.phr_non_normalized_warning,
40 R.drawable.ic_tofu_warning_circle, R.string.btn_got_it_exclamation), replaceInContainer = false)
41 }
42
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRBiometricsViewActivity.kt:9:1Line detected, which is longer than the defined maximum line length in the code style.
6 import com.sharecare.realgreen.presenter.phr.healthprofile.HPBiometricsSection
7
8
9 class PHRBiometricsViewActivity(dependentId: String? = null) : PHRTabHistoryInfoActivity<HPBiometricResult, HPBiometricsSection, PHRSectionMeta>(dependentId) {
10
11 override fun getHistoryListActivity() = PHRBiometricsHistoryActivity(dependentId)
12
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRBiometricsViewActivity.kt:18:9Line detected, which is longer than the defined maximum line length in the code style.
15
16 companion object {
17 @JvmStatic
18 fun makeInstance(sectionMeta: PHRSectionMeta, data: HPBiometricsSection, dependentId: String? = null) = PHRBiometricsViewActivity(dependentId).apply {
19 arguments = Bundle().apply {
20 putSerializable(EXTRA_PHR_SECTION_META, sectionMeta)
21 putSerializable(EXTRA_PHR_DATA, data)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRCipAddActivity.kt:27:1Line detected, which is longer than the defined maximum line length in the code style.
24 fun updateDate(year: Int, monthOfYear: Int, dayOfMonth: Int)
25 }
26
27 class PHRCipAddActivity(dependentId: String? = null) : PHRBaseAddActivity<PHRCipAddPresenter, HPCipResult, IPHRCipAddView, PHRSectionMeta.PHRCipSectionMeta>(dependentId), IPHRCipAddView {
28
29 private lateinit var binding: ActivityPhrCipAddBinding
30
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRCipAddActivity.kt:49:5Line detected, which is longer than the defined maximum line length in the code style.
46 DateUtil.getCalendar(year, monthOfYear, dayOfMonth), DateStyle.MEDIUM)
47 }
48
49 override fun showDatePicker(year: Int, monthOfYear: Int, dayOfMonth: Int) = showDatePickerDialog(activity as AppCompatActivity, dateSetListener, DateUtil.getCalendar(year, monthOfYear, dayOfMonth))
50
51 private val dateSetListener = DatePickerDialog.OnDateSetListener { _, year, month, dayOfMonth ->
52 presenter.onDateSelected(year, month, dayOfMonth)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRCipAddActivity.kt:57:9Line detected, which is longer than the defined maximum line length in the code style.
54
55 companion object {
56 @JvmStatic
57 fun makeInstance(sectionMeta: PHRSectionMeta, data: CICipSuggestionData, dependentId: String? = null) = PHRCipAddActivity(dependentId).apply {
58 arguments = Bundle().apply {
59 putSerializable(EXTRA_PHR_SECTION_META, sectionMeta)
60 putSerializable(EXTRA_PHR_DATA, data)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRCipDupEditActivity.kt:72:13Line detected, which is longer than the defined maximum line length in the code style.
69 }
70
71 override fun showDatePicker(year: Int, monthOfYear: Int, dayOfMonth: Int)
72 = showDatePickerDialog(activity as AppCompatActivity, dateSetListener, DateUtil.getCalendar(year, monthOfYear, dayOfMonth))
73
74 private val dateSetListener = DatePickerDialog.OnDateSetListener { _, year, month, dayOfMonth ->
75 presenter.onDateSelected(year, month, dayOfMonth)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRCipDupEditActivity.kt:122:9Line detected, which is longer than the defined maximum line length in the code style.
119
120 companion object {
121 @JvmStatic
122 fun makeInstance(sectionMeta: PHRSectionMeta, data: HPCipSection, dependentId: String? = null) = PHRCipDupEditActivity(dependentId).apply {
123 arguments = Bundle().apply {
124 putSerializable(EXTRA_PHR_SECTION_META, sectionMeta)
125 putSerializable(EXTRA_PHR_DATA, data)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRCipSearchActivity.kt:12:1Line detected, which is longer than the defined maximum line length in the code style.
9 import com.sharecare.realgreen.util.LegacyNavigatorImpl
10
11
12 class PHRCipSearchActivity(dependentId: String? = null): PHRSearchActivity<CICipSuggestionData, PHRSuggestedCipItemHolder>(dependentId) {
13
14 override fun createPresenter() = PHRCipSearchPresenter()
15
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRCipSearchActivity.kt:18:5Line detected, which is longer than the defined maximum line length in the code style.
15
16 override fun createAdapter() = PHRCipSearchAdapter(emptyList())
17
18 override fun onItemClick(item: CICipSuggestionData) = LegacyNavigatorImpl.toCipAdd(activity, phrSectionMeta, item, dependentId)
19
20 companion object {
21 @JvmStatic
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRCipSearchActivity.kt:22:9Line detected, which is longer than the defined maximum line length in the code style.
19
20 companion object {
21 @JvmStatic
22 fun makeInstance(sectionMeta: PHRSectionMeta, dependentId: String? = null) = PHRCipSearchActivity(dependentId).apply {
23 arguments = Bundle().apply {
24 putSerializable(EXTRA_PHR_SECTION_META, sectionMeta)
25 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRCipSectionListActivity.kt:13:1Line detected, which is longer than the defined maximum line length in the code style.
10 import com.sharecare.realgreen.presenter.phr.healthprofile.PHRCipListPresenter
11 import com.sharecare.realgreen.util.LegacyNavigatorImpl
12
13 class PHRCipSectionListActivity(dependentId: String? = null): PHRSectionListActivity<HPCipResult, HPCipSection, PHRCipItemHolder>(dependentId) {
14
15 override fun createPresenter() = PHRCipListPresenter(dependentId)
16
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRCipSectionListActivity.kt:29:9Line detected, which is longer than the defined maximum line length in the code style.
26
27 companion object {
28 @JvmStatic
29 fun makeInstance(phrSectionMeta: PHRSectionMeta, dependentId: String? = null) = PHRCipSectionListActivity(dependentId).apply {
30 arguments = Bundle().apply {
31 putSerializable(EXTRA_PHR_SECTION_META, phrSectionMeta)
32 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRCipViewActivity.kt:9:1Line detected, which is longer than the defined maximum line length in the code style.
6 import com.sharecare.realgreen.presenter.phr.healthprofile.HPCipSection
7
8
9 class PHRCipViewActivity(dependentId: String? = null): PHRTabHistoryInfoActivity<HPCipResult, HPCipSection, PHRSectionMeta.PHRCipSectionMeta>(dependentId) {
10
11 override fun getHistoryListActivity() = PHRCipHistoryListActivity(dependentId)
12 override fun getItemInfoActivity() = PHRTabInfoActivity<HPCipResult, HPCipSection>()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHREditActivity.kt:33:1Line detected, which is longer than the defined maximum line length in the code style.
30 import com.sharecare.realgreen.finddoctor.FindDoctorNavigator
31 import com.sharecare.realgreen.util.analytics.phr.PHRAnalytics
32
33 class PHREditActivity(private val dependentId: String? = null) : BaseFragment<BasePresenter<MvpView>, MvpView>(), PHREditMvpView, NavigationSuppressor {
34
35 private var title: String = ""
36 private var emptyState: Boolean = false
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHREditActivity.kt:141:17Line detected, which is longer than the defined maximum line length in the code style.
138 ToolbarUtil.clearNavigationButton(binding.toolbar.toolbar)
139 binding.toolbar.toolbar!!.menu.clear()
140 binding.toolbar.toolbar!!.inflateMenu(R.menu.menu_done)
141 (pagerAdapter as PHRDetailedParentPagerAdapter).addTabFragmentIfNotExisting(childFragmentManager.fragments[0])
142 (pagerAdapter as PHRDetailedParentPagerAdapter).showTrash(true)
143 pagerAdapter?.notifyDataSetChanged()
144 } else if (item.itemId == R.id.menu_item_done) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHREditFragment.kt:48:1Line detected, which is longer than the defined maximum line length in the code style.
45 import com.sharecare.realgreen.util.ItemTouchHelperExtension.ItemTouchHelperCallback
46 import com.sharecare.realgreen.util.ItemTouchHelperExtension.ItemTouchHelperExtension
47
48 class PHREditFragment(private val dependentId: String? = null) : BaseFragment<PHREditPresenter, PHREditFragmentMvpView>(), PHREditFragmentMvpView, SwipeRefreshLayout.OnRefreshListener {
49
50 private var adapter: PHRDetailAdapter? = null
51 private var scrollListener: EndlessRecyclerViewScrollListener? = null
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHREditFragment.kt:264:5Line detected, which is longer than the defined maximum line length in the code style.
261 .show()
262 }
263
264 fun deleteCareTeamTracker(careTeamDeleteModel: CareTeamDeleteModel, serverId: String, position: Int, isNewItem: Boolean) {
265 MaterialAlertDialogBuilder(requireContext())
266 .setTitle(R.string.care_teams_remove_entry_title)
267 .setMessage(getString(R.string.care_teams_remove_entry_description, careTeamDeleteModel.name))
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHREditFragment.kt:268:17Line detected, which is longer than the defined maximum line length in the code style.
265 MaterialAlertDialogBuilder(requireContext())
266 .setTitle(R.string.care_teams_remove_entry_title)
267 .setMessage(getString(R.string.care_teams_remove_entry_description, careTeamDeleteModel.name))
268 .setPositiveButton(R.string.btn_care_teams_remove_confirmation_dialog_delete) { _: DialogInterface, _: Int ->
269 (parentFragment as PHREditActivity).disableDoneButton()
270 if ((parentFragment as PHREditActivity).isNetworkAvailable()) {
271 category?.name?.let { presenter?.deleteEntry(careTeamDeleteModel, it, serverId) }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHREditFragment.kt:311:9Line detected, which is longer than the defined maximum line length in the code style.
308
309 private fun showCareTeamEmptyPage() {
310 disableRefreshPage()
311 emptyStateCareTeamBinding = DataBindingUtil.inflate<ViewEmptyStateCareTeamBinding>(layoutInflater, R.layout.view_empty_state_care_team, binding.layoutEmptyState, true)
312 emptyStateCareTeamBinding?.imageView?.setImageDrawable(ViewUtil.getPhrEmptyStateDrawable(context, category?.name))
313
314 if (ConfigurationManager().getConfiguration().isFeatureEnabled(FeatureToggleType.FIND_A_DOCTOR)) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHREditFragment.kt:312:9Line detected, which is longer than the defined maximum line length in the code style.
309 private fun showCareTeamEmptyPage() {
310 disableRefreshPage()
311 emptyStateCareTeamBinding = DataBindingUtil.inflate<ViewEmptyStateCareTeamBinding>(layoutInflater, R.layout.view_empty_state_care_team, binding.layoutEmptyState, true)
312 emptyStateCareTeamBinding?.imageView?.setImageDrawable(ViewUtil.getPhrEmptyStateDrawable(context, category?.name))
313
314 if (ConfigurationManager().getConfiguration().isFeatureEnabled(FeatureToggleType.FIND_A_DOCTOR)) {
315 emptyStateCareTeamBinding?.textViewDescription?.text = HtmlTool.fromHtml(getString(R.string.care_team_empty_state_description))
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHREditFragment.kt:315:13Line detected, which is longer than the defined maximum line length in the code style.
312 emptyStateCareTeamBinding?.imageView?.setImageDrawable(ViewUtil.getPhrEmptyStateDrawable(context, category?.name))
313
314 if (ConfigurationManager().getConfiguration().isFeatureEnabled(FeatureToggleType.FIND_A_DOCTOR)) {
315 emptyStateCareTeamBinding?.textViewDescription?.text = HtmlTool.fromHtml(getString(R.string.care_team_empty_state_description))
316 emptyStateCareTeamBinding?.textViewAddDoctors?.setOnClickListener {
317 FindDoctorNavigator.toSearchWebActivity(requireActivity(), dependentId = dependentId)
318 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHREditFragment.kt:320:13Line detected, which is longer than the defined maximum line length in the code style.
317 FindDoctorNavigator.toSearchWebActivity(requireActivity(), dependentId = dependentId)
318 }
319 } else {
320 emptyStateCareTeamBinding?.textViewDescription?.text = getString(R.string.care_team_empty_state_description_fad_disabled)
321 emptyStateCareTeamBinding?.textViewAddDoctors?.visibility = View.GONE
322 }
323
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRLabTestsDetailActivity.kt:27:1Line detected, which is longer than the defined maximum line length in the code style.
24 fun getNotesText(): String?
25 }
26
27 class PHRLabTestsDetailActivity: PHRSectionActivity<PHRLabTestsDetailPresenter, IPHRLabTestsDetailView, PHRSectionMeta.PHRCipSectionMeta>(), IPHRLabTestsDetailView {
28
29 private lateinit var binding: ActivityPhrCipDupEditBinding
30 private lateinit var itemNotes: TextInputEditText
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRLabTestsHistoryListActivity.kt:17:1Line detected, which is longer than the defined maximum line length in the code style.
14 fun toMainSectionList()
15 }
16
17 class PHRLabTestsHistoryListActivity(dependentId: String? = null): PHRListActivity<HPLabTestsResult, HPLabTestsSection, PHRLabTestsItemHolder,
18 PHRLabTestsHistoryListPresenter, IPHRLabTestsHistoryListView, PHRSectionMeta>(dependentId), IPHRLabTestsHistoryListView {
19
20 override fun createPresenter() = PHRLabTestsHistoryListPresenter(dependentId)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRLabTestsHistoryListActivity.kt:18:9Line detected, which is longer than the defined maximum line length in the code style.
15 }
16
17 class PHRLabTestsHistoryListActivity(dependentId: String? = null): PHRListActivity<HPLabTestsResult, HPLabTestsSection, PHRLabTestsItemHolder,
18 PHRLabTestsHistoryListPresenter, IPHRLabTestsHistoryListView, PHRSectionMeta>(dependentId), IPHRLabTestsHistoryListView {
19
20 override fun createPresenter() = PHRLabTestsHistoryListPresenter(dependentId)
21
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRLabTestsSectionListActivity.kt:18:1Line detected, which is longer than the defined maximum line length in the code style.
15 import com.sharecare.realgreen.util.LegacyNavigatorImpl
16
17
18 class PHRLabTestsSectionListActivity(dependentId: String? = null) : PHRSectionListActivity<HPLabTestsResult, HPLabTestsSection, PHRLabTestsItemHolder>(dependentId) {
19
20 override fun createPresenter() = PHRLabTestsListPresenter(dependentId)
21
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRLabTestsViewActivity.kt:9:1Line detected, which is longer than the defined maximum line length in the code style.
6 import com.sharecare.realgreen.presenter.phr.healthprofile.HPLabTestsSection
7
8
9 class PHRLabTestsViewActivity(dependentId: String? = null) : PHRTabHistoryInfoActivity<HPLabTestsResult, HPLabTestsSection, PHRSectionMeta.PHRCipSectionMeta>(dependentId) {
10
11 override fun getHistoryListActivity() = PHRLabTestsHistoryListActivity(dependentId)
12 override fun getItemInfoActivity() = PHRTabInfoActivity<HPLabTestsResult, HPLabTestsSection>()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRLabTestsViewActivity.kt:16:9Line detected, which is longer than the defined maximum line length in the code style.
13
14 companion object {
15 @JvmStatic
16 fun makeInstance(data: HPLabTestsSection, dependentId: String? = null) = PHRLabTestsViewActivity(dependentId).apply {
17 arguments = Bundle().apply {
18 putSerializable(EXTRA_PHR_SECTION_META, PHRSectionMeta.LABTESTS)
19 putSerializable(EXTRA_PHR_DATA, data)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRMedicationAddActivity.kt:123:17Line detected, which is longer than the defined maximum line length in the code style.
120 if (conf.isTrackerSupported(OrigamiTrackerType.MEDICATION_GROUP)) {
121 trackSwitcher.isChecked = presenter.isTracked(medicationSection.ciMedicationDetailData.matchCode.code)
122 trackSwitcher.jumpDrawablesToCurrentState()
123 currentSelectedDosageInPicker = presenter.getDosage(medicationSection.ciMedicationDetailData.matchCode.code)
124 dosageText.text = dosages[currentSelectedDosageInPicker - 1]
125
126 dosageRow.setOnClickListener {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRMedicationAddActivity.kt:168:9Line detected, which is longer than the defined maximum line length in the code style.
165
166 companion object {
167 @JvmStatic
168 fun makeInstance(medicationSection: HPMedicationSection, dependentId: String? = null) = PHRMedicationAddActivity(dependentId).apply {
169 arguments = Bundle().apply {
170 putSerializable(EXTRA_PHR_SECTION_META, PHRSectionMeta.MEDICATIONS)
171 putSerializable(EXTRA_PHR_DATA, medicationSection)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRMedicationsSearchActivity.kt:23:1Line detected, which is longer than the defined maximum line length in the code style.
20 import com.sharecare.realgreen.util.LegacyNavigatorImpl
21
22
23 class PHRMedicationsSearchActivity(dependentId: String? = null) : PHRSearchActivity<CIMedicationDetailData, PHRSuggestedMedicationItemHolder>(dependentId) {
24 init {
25 registerNavigationFlow()
26 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRMedicationsSearchActivity.kt:47:9Line detected, which is longer than the defined maximum line length in the code style.
44 super.showSuggestedItems(items)
45 val scanButton: View = adapter.getHeader()?.findViewById(R.id.scan_button) ?: return
46
47 val medicationInferenceEnabled = ConfigurationManager().getConfiguration().isFeatureEnabled(FeatureToggleType.MEDICATION_INFERENCE)
48 if (medicationInferenceEnabled) {
49 scanButton.visibility = View.VISIBLE
50 scanButton.setOnClickListener {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRMedicationsSectionListActivity.kt:23:1Line detected, which is longer than the defined maximum line length in the code style.
20 import com.sharecare.realgreen.screen.phr.healthprofile.reportMedicationPage
21 import com.sharecare.realgreen.util.LegacyNavigatorImpl
22
23 class PHRMedicationsSectionListActivity(dependentId: String? = null) : PHRSectionListActivity<HPMedicationResult, HPMedicationSection, PHRMedicationItemHolder>(dependentId) {
24 init {
25 reportMedicationPage()
26 registerNavigationFlow()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRMedicationsSectionListActivity.kt:77:9Line detected, which is longer than the defined maximum line length in the code style.
74
75 override fun showAddEditMenu() = with(bindToolbar!!) {
76 MenuCompat.setGroupDividerEnabled(menu, true)
77 val medicationInferenceEnabled = ConfigurationManager().getConfiguration().isFeatureEnabled(FeatureToggleType.MEDICATION_INFERENCE)
78
79 if (!medicationInferenceEnabled) {
80 super.showAddEditMenu()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRMedicationsSectionListActivity.kt:117:9Line detected, which is longer than the defined maximum line length in the code style.
114 override fun showEmpty() {
115 super.showEmpty()
116
117 val medicationInferenceEnabled = ConfigurationManager().getConfiguration().isFeatureEnabled(FeatureToggleType.MEDICATION_INFERENCE)
118 if (!medicationInferenceEnabled) {
119 return
120 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRSearchActivity.kt:121:17Line detected, which is longer than the defined maximum line length in the code style.
118 if (items.isNotEmpty()) {
119 listHeaderTextView.setText(R.string.search_suggestion)
120 } else {
121 showNoResultError(getString(R.string.no_results_found), getString(R.string.try_searching_for_something_else))
122 }
123 }
124 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRSectionListActivity.kt:29:5Line detected, which is longer than the defined maximum line length in the code style.
26 T : HPSection<H>,
27 VH : TrashableBindableViewHolder<T>
28 >(dependentId: String?)
29 : PHRListActivity<H, T, VH, PHRSectionListPresenter<H, T>, IPHRSectionListView<T>, PHRSectionMeta>(dependentId), IPHRSectionListView<T> {
30
31 private var pagingModeSnackBar: Snackbar? = null
32
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/detail/PHRTabHistoryInfoActivity.kt:34:5Line detected, which is longer than the defined maximum line length in the code style.
31 T : HPSection<H>,
32 PHRSECTION : PHRSectionMeta
33 >(dependentId: String? = null)
34 : PHRSectionActivity<PHRTabHistoryInfoPresenter<H, T>, IPHRTabHistoryInfoView<T>, PHRSECTION>(dependentId), IPHRTabHistoryInfoView<T> {
35
36 private lateinit var binding: ActivityPhrTabHistoryInfoBinding
37 private lateinit var pageName : String
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/healthprofile/HealthProfileActivity.kt:42:1Line detected, which is longer than the defined maximum line length in the code style.
39
40 const val SHP_ID = "SHP_ID"
41
42 class HealthProfileActivity(private val dependentId: String? = null) : BaseFragment<HealthProfilePresenter, HealthProfileMvpView>(), HealthProfileMvpView {
43
44
45 private lateinit var binding: ActivityHealthProfileBinding
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/healthprofile/HealthProfileActivity.kt:170:13Line detected, which is longer than the defined maximum line length in the code style.
167 HealthCategory.BIOMETRICS -> PHRBiometricsDashboardActivity.makeInstance(dependentId)
168 HealthCategory.MEDICATIONS -> PHRMedicationsSectionListActivity.makeInstance(dependentId)
169 HealthCategory.CONDITIONS -> PHRCipSectionListActivity.makeInstance(PHRSectionMeta.CONDITIONS, dependentId)
170 HealthCategory.IMMUNIZATIONS -> PHRCipSectionListActivity.makeInstance(PHRSectionMeta.IMMUNIZATIONS, dependentId)
171 HealthCategory.PROCEDURES -> PHRCipSectionListActivity.makeInstance(PHRSectionMeta.PROCEDURES, dependentId)
172 HealthCategory.LAB_TESTS -> PHRLabTestsSectionListActivity.makeInstance(dependentId)
173 HealthCategory.CARE_TEAMS -> PHREditActivity.makeInstance(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/healthprofile/HealthProfileActivity.kt:260:17Line detected, which is longer than the defined maximum line length in the code style.
257 if (arguments != null) {
258 val origin = requireArguments().getString(NavigatorCoreUtil.KEY_DESTINATION_ARGS)
259 if (DoctorProfileUtil.FROM_DOCTOR_PROFILE_PAGE == origin) {
260 val categoryTitle = requireContext().getString(HealthCategory[HealthCategory.CARE_TEAMS.name]!!.stringId)
261 val phrEditActivity = PHREditActivity.makeInstance(
262 HealthCategory.CARE_TEAMS.name,
263 "",
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/phr/healthprofile/HealthProfileAdapter.kt:8:1Line detected, which is longer than the defined maximum line length in the code style.
5 import com.sharecare.realgreen.core.widgets.recycleView.GenericItemFactory
6 import com.sharecare.realgreen.core.widgets.recycleView.items.ListTitleViewBuilder
7
8 class HealthProfileAdapter(data: List<Any> = listOf(), val clickListener: (category: HealthCategory) -> Unit) : GenericAdapter(data) {
9
10 override fun onBindViewHolder(holder: ViewHolder, position: Int) {
11 super.onBindViewHolder(holder, position)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/realage/MultipleGroupsSelectionAdapter.kt:21:5Line detected, which is longer than the defined maximum line length in the code style.
18 private var selectedViewsByGroup: MutableMap<String, OptionView<T>> = mutableMapOf()
19 private var onSelectionChange: OnSelectionChange<T>
20
21 constructor(data: List<Any>, selectedOptionsByGroup: SelectedOptions<T>, onSelectionChange: OnSelectionChange<T> = {}) : super(data) {
22 this.selectedOptionsByGroup = selectedOptionsByGroup
23 this.onSelectionChange = onSelectionChange
24 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/realage/calculating/presenter/RATCalculatingPresenter.kt:33:9Line detected, which is longer than the defined maximum line length in the code style.
30
31 fun calculateRealAge() {
32 mvpView.showLoader()
33 compositeSubscription.add(Single.zip<List<RecommendationGroup>, Calculation, Pair<List<RecommendationGroup>, Calculation>>(
34 realAgeRepository.getRecommendationsGroupsObservable(), realAgeRepository.getCalculationObservable(),
35 BiFunction { recommendationGroups, calculation -> return@BiFunction Pair(recommendationGroups, calculation) })
36 .doOnSuccess { result: Pair<List<RecommendationGroup>, Calculation> ->
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/realage/calculating/presenter/RATCalculatingPresenter.kt:35:17Line detected, which is longer than the defined maximum line length in the code style.
32 mvpView.showLoader()
33 compositeSubscription.add(Single.zip<List<RecommendationGroup>, Calculation, Pair<List<RecommendationGroup>, Calculation>>(
34 realAgeRepository.getRecommendationsGroupsObservable(), realAgeRepository.getCalculationObservable(),
35 BiFunction { recommendationGroups, calculation -> return@BiFunction Pair(recommendationGroups, calculation) })
36 .doOnSuccess { result: Pair<List<RecommendationGroup>, Calculation> ->
37 handleEmptyResponse(result.first, result.second)
38 result.first.let { realAgeRepository.updateTopicTags(result.first) }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/realage/calculating/repository/RATCalculatingDataRepository.kt:15:5Line detected, which is longer than the defined maximum line length in the code style.
12
13 class RATCalculatingDataRepository : RATCalculatingRepository {
14
15 private val realAgeService: RealAgeService = ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.REALAGE_SHARECARE) as RealAgeService
16
17 override fun getCalculationObservable(): Single<Calculation> {
18 return RxWrapperUtil.create(RxWrapperUtil.RemoteTransaction<Calculation> { realAgeService.getCalculation() })
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/realage/calculating/repository/RATCalculatingDataRepository.kt:22:9Line detected, which is longer than the defined maximum line length in the code style.
19 }
20
21 override fun getRecommendationsGroupsObservable(): Single<List<RecommendationGroup>> {
22 return RxWrapperUtil.create(RxWrapperUtil.RemoteTransaction<List<RecommendationGroup>> { realAgeService.getRecommendationGroups() })
23 }
24
25 override fun getRealAgeStatus(): RealAgeStatus? {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/realage/completion/RatLineView.kt:80:9Line detected, which is longer than the defined maximum line length in the code style.
77 val monthMonthValue = params.calendarAgeMonths.toString().padStart(2, '0')
78 val calendarYearValue = params.calendarAgeYears.toString().padStart(2, '0')
79
80 val partialMessageA = resources.getQuantityString(R.plurals.rat_year_plurals, params.differenceInYears, params.differenceInYears)
81 val partialMessageB = resources.getQuantityString(R.plurals.rat_month_plurals, params.differenceInMonths, params.differenceInMonths)
82 val partialMessageC = resources.getString(R.string.real_age_value_string, calendarYearValue, monthMonthValue)
83
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/realage/completion/RatLineView.kt:81:9Line detected, which is longer than the defined maximum line length in the code style.
78 val calendarYearValue = params.calendarAgeYears.toString().padStart(2, '0')
79
80 val partialMessageA = resources.getQuantityString(R.plurals.rat_year_plurals, params.differenceInYears, params.differenceInYears)
81 val partialMessageB = resources.getQuantityString(R.plurals.rat_month_plurals, params.differenceInMonths, params.differenceInMonths)
82 val partialMessageC = resources.getString(R.string.real_age_value_string, calendarYearValue, monthMonthValue)
83
84 val message = when {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/realage/completion/RatLineView.kt:86:13Line detected, which is longer than the defined maximum line length in the code style.
83
84 val message = when {
85 biologicalAge == realAgeValue -> resources.getString(R.string.rat_result_equal, partialMessageC)
86 biologicalAge > realAgeValue -> resources.getString(R.string.rat_result_less_than, partialMessageA, partialMessageB, partialMessageC)
87 else -> resources.getString(R.string.rat_result_greater_than, partialMessageA, partialMessageB, partialMessageC)
88 }
89
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/realage/completion/RatLineView.kt:87:13Line detected, which is longer than the defined maximum line length in the code style.
84 val message = when {
85 biologicalAge == realAgeValue -> resources.getString(R.string.rat_result_equal, partialMessageC)
86 biologicalAge > realAgeValue -> resources.getString(R.string.rat_result_less_than, partialMessageA, partialMessageB, partialMessageC)
87 else -> resources.getString(R.string.rat_result_greater_than, partialMessageA, partialMessageB, partialMessageC)
88 }
89
90 binding.realAgeResult.text = HtmlTool.fromHtml(message)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/realage/completion/RatLineView.kt:111:5Line detected, which is longer than the defined maximum line length in the code style.
108 binding.icon.setTint(colorId)
109 }
110
111 private fun calculateBarLengthInPercentage(biologicalAge: Double, realAgeValue: Double, limitFromBiologicalAge: Double): Double {
112 return calculateBarLengthInPercentage(biologicalAge, realAgeValue, limitFromBiologicalAge, limitFromBiologicalAge)
113 }
114
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/realage/completion/RatLineView.kt:112:9Line detected, which is longer than the defined maximum line length in the code style.
109 }
110
111 private fun calculateBarLengthInPercentage(biologicalAge: Double, realAgeValue: Double, limitFromBiologicalAge: Double): Double {
112 return calculateBarLengthInPercentage(biologicalAge, realAgeValue, limitFromBiologicalAge, limitFromBiologicalAge)
113 }
114
115 /**
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/realage/completion/RatLineView.kt:121:5Line detected, which is longer than the defined maximum line length in the code style.
118 * lowerLimitFromBiologicalAge > upperLimitFromBiologicalAge, product
119 * will need to determine what happens in this case
120 */
121 private fun calculateBarLengthInPercentage(biologicalAge: Double, realAgeValue: Double, lowerLimitFromBiologicalAge: Double, upperLimitFromBiologicalAge: Double, minimumPercentageValue: Double = .02): Double {
122 val lowerLimit = biologicalAge - lowerLimitFromBiologicalAge
123 val upperLimit = biologicalAge + upperLimitFromBiologicalAge
124
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/realage/history/RatHistoryFragment.kt:20:1Line detected, which is longer than the defined maximum line length in the code style.
17 import com.sharecare.realgreen.presenter.realage.RatPresenter
18 import com.sharecare.realgreen.repository.realage.RatDataRepository
19
20 class RatHistoryFragment : BaseFragment<RatPresenter, RatHistoryMvpView>(), RatHistoryMvpView, SwipeRefreshLayout.OnRefreshListener {
21
22
23 private lateinit var binding: ActivityRatHistoryBinding
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/realage/history/RatHistoryItemsHolder.kt:33:13Line detected, which is longer than the defined maximum line length in the code style.
30 this.assessmentHistory = assessmentHistory
31 val delta = calculateDelta()
32 binding.textViewRatDelta.text = when {
33 delta.isRealAgeYoungerThanCalendar -> binding.root.context.getString(R.string.real_age_delta_younger, delta.differenceInYears.toString(), delta.differenceInMonths.toString())
34 delta.isAgeMatching -> binding.root.context.getString(R.string.real_age_delta_matching, delta.differenceInYears.toString(), delta.differenceInMonths.toString())
35 else -> binding.root.context.getString(R.string.real_age_delta_older, delta.differenceInYears.toString(), delta.differenceInMonths.toString())
36 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/realage/history/RatHistoryItemsHolder.kt:34:13Line detected, which is longer than the defined maximum line length in the code style.
31 val delta = calculateDelta()
32 binding.textViewRatDelta.text = when {
33 delta.isRealAgeYoungerThanCalendar -> binding.root.context.getString(R.string.real_age_delta_younger, delta.differenceInYears.toString(), delta.differenceInMonths.toString())
34 delta.isAgeMatching -> binding.root.context.getString(R.string.real_age_delta_matching, delta.differenceInYears.toString(), delta.differenceInMonths.toString())
35 else -> binding.root.context.getString(R.string.real_age_delta_older, delta.differenceInYears.toString(), delta.differenceInMonths.toString())
36 }
37 val reformattedCreatedDate = reformatCreatedDate()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/realage/history/RatHistoryItemsHolder.kt:35:13Line detected, which is longer than the defined maximum line length in the code style.
32 binding.textViewRatDelta.text = when {
33 delta.isRealAgeYoungerThanCalendar -> binding.root.context.getString(R.string.real_age_delta_younger, delta.differenceInYears.toString(), delta.differenceInMonths.toString())
34 delta.isAgeMatching -> binding.root.context.getString(R.string.real_age_delta_matching, delta.differenceInYears.toString(), delta.differenceInMonths.toString())
35 else -> binding.root.context.getString(R.string.real_age_delta_older, delta.differenceInYears.toString(), delta.differenceInMonths.toString())
36 }
37 val reformattedCreatedDate = reformatCreatedDate()
38
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/realage/improverealage/presenter/ImproveYourRealAgePresenter.kt:9:1Line detected, which is longer than the defined maximum line length in the code style.
6 import com.sharecare.realgreen.realage.repository.RealAgeProgramRepository
7 import com.sharecare.realgreen.screen.realage.improverealage.ui.ImproveYourRealAgeView
8
9 class ImproveYourRealAgePresenter(private val repository: RealAgeProgramRepository) : BasePresenter<ImproveYourRealAgeView>() {
10 fun getPostRatData() {
11 mvpView?.showProgress(true)
12 addDisposable(repository
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/realage/improverealage/ui/ImproveYourRealAgeFragment.kt:28:1Line detected, which is longer than the defined maximum line length in the code style.
25 import com.sharecare.realgreen.screen.realage.improverealage.presenter.ImproveYourRealAgePresenter
26
27
28 class ImproveYourRealAgeFragment : BaseFragment<ImproveYourRealAgePresenter, ImproveYourRealAgeView>(), ImproveYourRealAgeView {
29 private lateinit var binding: FragmentImproveYourRealAgeBinding
30
31 override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/realage/improverealage/ui/ImproveYourRealAgeFragment.kt:66:5Line detected, which is longer than the defined maximum line length in the code style.
63 }
64 }
65
66 private class ViewHolder(val binding: ImproveRealageCardViewBinding) : BindableViewHolder<Recommendation>(binding.root) {
67 override fun onBind(item: Recommendation) {
68 with(binding) {
69 DataBindingAdapters.setImageUrl(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/realage/improverealage/ui/ImproveYourRealAgeFragment.kt:86:5Line detected, which is longer than the defined maximum line length in the code style.
83 }
84 }
85
86 private class Adapter(recommendations: Recommendations) : FixedListAdapter<Recommendation, ViewHolder>(recommendations.items) {
87 override fun onCreateActualViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
88 val inflater = LayoutInflater.from(parent.context)
89
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/realage/seealltips/presenter/SeeAllTipsPresenter.kt:10:1Line detected, which is longer than the defined maximum line length in the code style.
7 import com.sharecare.realgreen.screen.realage.tips.TipTypeEnum
8 import com.sharecare.realgreen.util.getTipType
9
10 class SeeAllTipsPresenter(private val tipType: TipTypeEnum, val recommendations: List<Recommendation>?) : BasePresenter<SeeAllTipsView>() {
11
12 override fun attachView(mvpView: SeeAllTipsView) {
13 super.attachView(mvpView)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/realage/tips/RatTipsAdapter.kt:12:1Line detected, which is longer than the defined maximum line length in the code style.
9 import com.sharecare.realgreen.core.tool.listadapter.ItemClickListener
10 import com.sharecare.realgreen.databinding.ItemRatTipBinding
11
12 class RatTipsAdapter(listener: ItemClickListener<Recommendation>) : HeaderFooterListAdapter<Recommendation, RatTipViewHolder>(emptyList()) {
13
14 init {
15 this.listener = listener
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/realage/tips/RatTipsFragment.kt:151:13Line detected, which is longer than the defined maximum line length in the code style.
148 adapter.items = shownItems
149 if (shownItems.isEmpty()) {
150 setVisibilities(View.GONE, View.VISIBLE)
151 binding.screenMessage.setImage(if (realAgeSourceType == RealAgeSourceType.MAKING_YOU_YOUNGER) R.drawable.rat_younger else R.drawable.rat_older)
152 } else {
153 setVisibilities(View.VISIBLE, View.GONE)
154 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/realage/tips/RatTipsFragment.kt:164:17Line detected, which is longer than the defined maximum line length in the code style.
161 for (i in recommendations.indices) {
162 val recommendation = recommendations[i]
163
164 if (recommendation.benefitCost != null && realAgeSourceType?.equals(recommendation.getRealAgeStatus()) != false) {
165 result.add(recommendation)
166 }
167 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/realage/tips/adapter/TipTitleViewHolder.kt:9:1Line detected, which is longer than the defined maximum line length in the code style.
6 import com.sharecare.realgreen.databinding.TipsTitleItemBinding
7 import com.sharecare.realgreen.model.HeaderTip
8
9 class TipTitleViewHolder(private val binding: TipsTitleItemBinding, private val itemClickListener: ItemClickListener<HeaderTip>?) : BindableViewHolder<HeaderTip>(binding.root) {
10
11 override fun onBind(item: HeaderTip) {
12 binding.title.setTextOrHide(item.title)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/search/doctorsfilter/presenter/DoctorFilterPresenter.kt:23:29Line detected, which is longer than the defined maximum line length in the code style.
20 .withDefaultSchedulers()
21 .doFinally { applyToView { showProgress(false) } }
22 .subscribe({
23 val filterList = getFilterOptionData(it.additionalInfo.specialty, it.additionalInfo.selected)
24 applyToView {
25 updateSpecialities(it.additionalInfo.selected.size, filterList)
26 loadDoctorsData(it.results as List<Provider>)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/securitypin/PinExplanatoryActivity.kt:59:9Line detected, which is longer than the defined maximum line length in the code style.
56
57 private fun callLogoutIntent(){
58 val intent = Intent(this, LoginRegisterSelectorActivity::class.java)
59 intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK)
60 startActivity(intent)
61 finish()
62 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/securitypin/SecurityPinAutoLockActivity.kt:39:29Line detected, which is longer than the defined maximum line length in the code style.
36 val radio: MaterialRadioButton = findViewById(checkedId)
37 when (radio) {
38 binding.fifteenSecondsrb -> {
39 lockManager!!.getAppLock().timeout = SecurityPinSettingsUtil.FIFTEEN_SECONDS_TIMEOUT.toLong()
40 timoutResult=R.string.pin_lock_timeout_15_seconds
41 }
42 binding.thirySecondsrb -> {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/sleep/view/presenter/SleepInnerPresenter.kt:29:13Line detected, which is longer than the defined maximum line length in the code style.
26
27 fun getTitle(context: Context): String {
28 if (sleepInnerModel.sleepDateTime != null && sleepInnerModel.riseDateTime != null) {
29 return TrackerSleepUtil.getTitleText(context, sleepInnerModel.sleepDateTime!!, sleepInnerModel.riseDateTime!!)
30 } else if (sleepInnerModel.duration != null) {
31 return TrackerSleepUtil.getTitleText(context, sleepInnerModel.duration!!)
32 } else {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/sleep/view/ui/SleepInnerView.kt:124:9Line detected, which is longer than the defined maximum line length in the code style.
121 // or we edit a tracker (extId = "some value")
122 // so we init extId as an empty string to treat it as an exsisting tracker because on the feed we never
123 // create one
124 initWithData(DateTime(riseDateTime, DateTimeZone.forID(zoneId)), // this is a default value and it won't be used because we have a valid sleep
125 // and rise date times
126 DateTime(sleepDateTime, DateTimeZone.forID(zoneId)),
127 DateTime(riseDateTime, DateTimeZone.forID(zoneId)),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/sleep/view/ui/SleepInnerView.kt:178:9Line detected, which is longer than the defined maximum line length in the code style.
175 dateTime: DateTime,
176 title: String,
177 action: String) {
178 val timeDialog = TofuTimePickerDialog.newInstance(TimePickerDialog.OnTimeSetListener { _, hourOfDay, minuteOfHour, _ ->
179 val correctedDate = DateTime(dateTime.year, dateTime.monthOfYear,
180 dateTime.dayOfMonth, hourOfDay, minuteOfHour)
181 presenter.analyticsActions.add(action)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/sync/SyncActivity.kt:115:9Line detected, which is longer than the defined maximum line length in the code style.
112 }
113
114 override fun goToCollectPhone(data: OnboardingResponse) {
115 NavHostActivity::class.start(this, MainGraphDirections.toLaunch(), LaunchGraphDirections.toPhoneCollection(data))
116 }
117
118 override fun goToOnboarding() {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/sync/SyncActivity.kt:126:13Line detected, which is longer than the defined maximum line length in the code style.
123
124 override fun goToAdvocacyOnBoarding() {
125 startActivity(Intent(this, AdvocacyOnBoardActivity::class.java).apply {
126 putExtra(AdvocacyOnBoardActivity.Companion.StartScreen::class.simpleName!!, AdvocacyOnBoardActivity.Companion.StartScreen.INTRO.name)
127 })
128 overridePendingTransition(0, 0)
129 finish()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/sync/SyncActivity.kt:134:13Line detected, which is longer than the defined maximum line length in the code style.
131
132 override fun jumpToDialogPreferences() {
133 startActivity(Intent(this, AdvocacyOnBoardActivity::class.java).apply {
134 putExtra(AdvocacyOnBoardActivity.Companion.StartScreen::class.simpleName!!, AdvocacyOnBoardActivity.Companion.StartScreen.PREFERENCE.name)
135 })
136 overridePendingTransition(0, 0)
137 finish()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/sync/SyncPresenter.kt:62:2Line detected, which is longer than the defined maximum line length in the code style.
59
60 /**
61 * We are using runBlocking in one of the functions of this class
62 * Important: runBlocking needs to be changed into a suspend function as soon as the call chain gets wrapper by a coroutine scope. Otherwise this might suspend the worker threads forever.
63 */
64 class SyncPresenter(
65 private val userAccountRepository: LegacyAccountRepository,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/sync/SyncPresenter.kt:68:9Line detected, which is longer than the defined maximum line length in the code style.
65 private val userAccountRepository: LegacyAccountRepository,
66 private val trackerMeasurementRepository: TrackerMeasurementRepository,
67 private val userWasCreated: Boolean,
68 private val advocacyOnboardingRepository: AdvocacyOnBoardingRepository = AdvocacyOnBoardingRepository::class.inject(),
69 private val advocateRepository: AdvocateRepository = AdvocateRepository::class.inject(),
70 private val missingFieldsRepository: MissingFieldsApiRepository = MissingFieldsApiRepository::class.inject(),
71 private val appScope: CoroutineScope = backgroundScope(),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/sync/SyncPresenter.kt:130:5Line detected, which is longer than the defined maximum line length in the code style.
127 * Referenced by start()
128 * if we didn't sync at all previously, assume the cached configuration is valid
129 */
130 private fun syncStart(): Single<SyncPresenterResult> = if (PreferenceStore.getLastSyncDateSetting() == null) doSyncInitial() else doSyncEveryNextTime()
131
132 /**
133 * responsible for handling sync after login or registration
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/sync/SyncPresenter.kt:208:13Line detected, which is longer than the defined maximum line length in the code style.
205 SyncPresenterResult.SYNC_SUCCESSFUL
206 }
207 // User was logged in before and we want to allow him accessing app in offline mode
208 SyncPresenterResult.ERROR_NO_INTERNET -> RxWrapperUtil.create<SyncPresenterResult> { SyncPresenterResult.SYNC_SUCCESSFUL }
209 // Copy unsuccessful code
210 else -> RxWrapperUtil.create<SyncPresenterResult> { it }
211 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/sync/SyncPresenter.kt:335:29Line detected, which is longer than the defined maximum line length in the code style.
332 }).withDefaultSchedulers()
333 .subscribe({ result ->
334 PreferenceStore.setUserSettings(UserSettingData(result.first.data))
335 ThemeUtil().setDefaultAppTheme(result.second.data[UserSettingsService.SettingsType.THEME_SETTING.typeName].toString())
336 }, { e -> L.e(e.message, e) })
337 )
338 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/sync/SyncPresenter.kt:342:6Line detected, which is longer than the defined maximum line length in the code style.
339
340 /**
341 * We are using runBlocking here because the function is called within RxJava
342 * Important: this needs to be changed into a suspend function as soon as the call chain happens in a coroutine scope.
343 */
344 private fun checkAdvocacyOnBoarding(): SyncPresenterResult = runBlocking {
345 with(globalInjection().get<AdvocacyParams>().androidLogger()) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/sync/SyncPresenter.kt:351:17Line detected, which is longer than the defined maximum line length in the code style.
348 i("Sync presenter advocacy check result -> ${result?.screenFlow}")
349 return@runBlocking when {
350 result == null -> SyncPresenterResult.SYNC_SUCCESSFUL
351 result.screenFlow == AdvocacyScreenFlow.JumpToDialogPreferences -> SyncPresenterResult.ADVOCACY_JUMPTO_DIALOGPREFERENCES
352 result.screenFlow == AdvocacyScreenFlow.ShowAdvocacyIntro -> SyncPresenterResult.ADVOCACY_ON_BOARDING
353 else -> {
354 w("Unmapped screen flow")
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/sync/SyncPresenter.kt:363:13Line detected, which is longer than the defined maximum line length in the code style.
360
361 private fun checkMissingFields(): SyncPresenterResult? = runBlocking {
362 return@runBlocking when (val result = missingFieldsRepository.getMissingFields()) {
363 is MissingFieldsResult.GenericResult -> if (JavaBuildConfig.FEATURE_ENABLED_ONBOARDING) SyncPresenterResult.ONBOARDING_MISSING_FIELD else null
364 is MissingFieldsResult.PhoneCollectResult -> SyncPresenterResult.PhoneCollection(result.response)
365 else -> null
366 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/worker/DispatchJobWorker.kt:204:13Line detected, which is longer than the defined maximum line length in the code style.
201 private fun sendTimezoneChange() {
202 try {
203 val currentTimezone = DateUtil.getNonCachedTimezone().id
204 if (PreferenceStore.isWelcomeCardAddedSetting() && PreferenceStore.getLastDeviceTimezoneSetting() != currentTimezone) {
205 val usersService = ServiceFactory.getInstance()
206 .createService(ServiceFactory.ServiceType.USERS) as UsersService
207 usersService.updateTimezone(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/screen/worker/ItemRecordSyncWorker.kt:78:25Line detected, which is longer than the defined maximum line length in the code style.
75
76 feedback?.let { _ ->
77 updateItem(itemRecord, listener = {
78 itemsService.updateItemFeedback(itemRecord.serverId, ItemType.getType(itemRecord.itemType), feedback)
79 sendAnalyticsForSleepFeedback(feedback)
80 })
81 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/service/fcm/FcmUserUtil.kt:31:5Line detected, which is longer than the defined maximum line length in the code style.
28 }
29 }
30
31 /* This method is sending empty token to our server to remove the previous registered token from the list, Method should be called when user will log out*/
32 @JvmStatic
33 fun unregisterFcmToken(): Completable {
34 return getRegisterGcmTokenCompletable(null)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/tool/GlobalSocketConnection.kt:23:9Line detected, which is longer than the defined maximum line length in the code style.
20 class GlobalSocketConnection {
21
22 fun registerSocketConnection(activity: Activity) {
23 registerForSocketConnection((activity as AuthenticatedActivity<*, *>).lifecycle, listOf(EventType.GDT_UPDATED, EventType.ON_SCREEN_NOTIFICATIONS_NEW),
24 object : MessageListener {
25 override fun onSocketMessage(message: String?, params: JsonElement?) {
26 checkSocketMessage(message, params, activity)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/tool/PHRBiometricsUtils.kt:49:5Line detected, which is longer than the defined maximum line length in the code style.
46 MILLIMETER_OF_MERCURY("mmHG", R.string.phr_measurement_unit_millimeter_of_mercury),
47 }
48
49 private fun getMeasurementUnitByConst(const: String) = enumValues<MeasurementUnit>().find { it.constValue.equals(const, true) }
50
51 class MeasurementConversion(
52 val source: MeasurementUnit,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/tool/PHRBiometricsUtils.kt:135:5Line detected, which is longer than the defined maximum line length in the code style.
132 return String.format("%." + places.toString() + "f", value)
133 }
134
135 fun getStringWithUnit(value: Double, places: Int, unit: String) = getStringWithNumberFormatting(value, places) + " " + mapUnitName(unit)
136
137 private const val INCHES_PER_FOOT = 12.0
138
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/type/deeplink/CommunicationsSettingsParser.kt:34:9Line detected, which is longer than the defined maximum line length in the code style.
31 }
32 }
33
34 override fun isWebViewDestination() = DeepLinkDispatcher.isFeatureSupported(FeatureToggleType.NOTIFICATION_SETTINGS)
35 },
36 COMMUNICATIONS(arrayOf("communications")) {
37 override fun start(context: Context, asPush: Boolean) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/type/deeplink/CommunicationsSettingsParser.kt:38:13Line detected, which is longer than the defined maximum line length in the code style.
35 },
36 COMMUNICATIONS(arrayOf("communications")) {
37 override fun start(context: Context, asPush: Boolean) {
38 NavHostActivity::class.start(context, MainGraphDirections.toSettings(), SettingsGraphDirections.toCommSettings())
39 }
40 },
41 COMMUNICATIONS_PUSH_NOTIFICATION(arrayOf("communications", "push")) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/type/deeplink/CommunicationsSettingsParser.kt:43:13Line detected, which is longer than the defined maximum line length in the code style.
40 },
41 COMMUNICATIONS_PUSH_NOTIFICATION(arrayOf("communications", "push")) {
42 override fun start(context: Context, asPush: Boolean) {
43 NavHostActivity::class.start(context, MainGraphDirections.toSettings(), SettingsGraphDirections.toPushSettings())
44 }
45 };
46
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/type/deeplink/MiscLinkParsers.kt:26:1Line detected, which is longer than the defined maximum line length in the code style.
23 import com.sharecare.settings.SettingsGraphDirections
24
25
26 @Reminder("TODO This class contains knows about too many features and should be split into multiple parsers for each feature") //TODO
27 class MiscDeepLinkParser : LinkParser {
28 override fun parse(url: String): DeepLinkDestination? {
29 val pathSegments = Uri.parse(url).pathSegments.toTypedArray()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/type/deeplink/MiscLinkParsers.kt:155:9Line detected, which is longer than the defined maximum line length in the code style.
152 override fun isWebViewDestination() = true
153 };
154 companion object {
155 fun start(context: Context, activityClass: Class<out Activity>, asPush: Boolean, featureToCheck: FeatureToggleType? = null) {
156 if (featureToCheck != null && !DeepLinkDispatcher.isFeatureSupported(featureToCheck)) {
157 return
158 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/type/deeplink/SettingsParser.kt:72:9Line detected, which is longer than the defined maximum line length in the code style.
69
70 class AuthorizationsDestination : DeepLinkDestination {
71 override fun start(context: Context, asPush: Boolean) {
72 NavHostActivity::class.start(context, MainGraphDirections.toSettings(), SettingsGraphDirections.toAuthorizationSettings())
73 }
74 }
75
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/type/deeplink/ThirdPartyAuthorizationParser.kt:22:5Line detected, which is longer than the defined maximum line length in the code style.
19 }
20 }
21
22 class ThirdPartyAuthorizationDestination(private val clientId: String?, private val redirectUri: String?) : DeepLinkDestination {
23 override fun start(context: Context, asPush: Boolean) {
24 if (clientId?.isNotEmpty() == true && redirectUri?.isNotEmpty() == true) {
25 val host = ConfigurationManager().getConfiguration()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/type/deeplink/ThirdPartyAuthorizationParser.kt:36:9Line detected, which is longer than the defined maximum line length in the code style.
33 companion object {
34 const val CLIENT_ID = "client_id"
35 const val REDIRECT_URI = "redirect_uri"
36 private fun getAuthLink(host: String, clientId: String, redirectUri: String) = "$host/oauth2/authorize?response_type=code&client_id=$clientId&redirect_uri=$redirectUri"
37 }
38
39 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/util/AnalyticsUtilExtension.kt:18:25Line detected, which is longer than the defined maximum line length in the code style.
15 AnalyticsCore.pageView(page)
16 .siteSectionAndContentType(siteSection, contentType)
17 .customParam(
18 if (relationship) GeneralAnalytics.ContextData.RELATIONSHIP_TYPE else GeneralAnalytics.ContextData.CALL_TYPE,
19 ViewUtil.getRelationshipDescription(context, intensity).toLowerCase())
20 .customParam(
21 if (relationship) GeneralAnalytics.ContextData.RELATIONSHIP_TYPE_COLOR else GeneralAnalytics.ContextData.CALL_TYPE_COLOR,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/util/AnalyticsUtilExtension.kt:21:25Line detected, which is longer than the defined maximum line length in the code style.
18 if (relationship) GeneralAnalytics.ContextData.RELATIONSHIP_TYPE else GeneralAnalytics.ContextData.CALL_TYPE,
19 ViewUtil.getRelationshipDescription(context, intensity).toLowerCase())
20 .customParam(
21 if (relationship) GeneralAnalytics.ContextData.RELATIONSHIP_TYPE_COLOR else GeneralAnalytics.ContextData.CALL_TYPE_COLOR,
22 ViewUtil.getRelationshipColorName(context, intensity))
23 }
24 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/util/ItemTouchHelperExtension/ItemTouchHelperCallback.kt:16:5Line detected, which is longer than the defined maximum line length in the code style.
13 return makeMovementFlags(ItemTouchHelper.UP or ItemTouchHelper.DOWN, ItemTouchHelper.START)
14 }
15
16 override fun onMove(recyclerView: RecyclerView?, viewHolder: RecyclerView.ViewHolder?, target: RecyclerView.ViewHolder?): Boolean {
17 return false
18 }
19
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/util/ItemTouchHelperExtension/ItemTouchHelperCallback.kt:27:5Line detected, which is longer than the defined maximum line length in the code style.
24 return false
25 }
26
27 override fun onChildDraw(c: Canvas?, recyclerView: RecyclerView?, viewHolder: RecyclerView.ViewHolder?, dX: Float, dY: Float, actionState: Int, isCurrentlyActive: Boolean) {
28 if (dY != 0f && dX == 0f) {
29 super.onChildDraw(c, recyclerView, viewHolder, dX, dY, actionState, isCurrentlyActive)
30 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/util/LegacyNavigatorImpl.kt:59:1Line detected, which is longer than the defined maximum line length in the code style.
56 /**
57 * Class used to navigate through the application.
58 */
59 @CoreComponent(msg = "Used to navigate within the app from one activity to another activity or to other fragments", type = ComponentType.Navigation)
60 object LegacyNavigatorImpl {
61
62 @JvmStatic
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/util/LegacyNavigatorImpl.kt:65:9Line detected, which is longer than the defined maximum line length in the code style.
62 @JvmStatic
63 fun toLoginRegisterActivity(context: Context) {
64 val intent = Intent(context, LoginRegisterSelectorActivity::class.java)
65 intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK)
66 context.startActivity(intent)
67 }
68
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/util/LegacyNavigatorImpl.kt:95:5Line detected, which is longer than the defined maximum line length in the code style.
92 .goToNextFragment(RelationshipDetailsChildFragment.makeAggregationInstance())
93
94 @JvmStatic
95 fun toOnboardingIntro(context: Context) = context.startActivity(Intent(context, OnboardingIntroActivity::class.java))
96
97 @JvmOverloads
98 fun toSynchronization(context: Context, userWasCreated: Boolean = false) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/util/PhrUtil.kt:50:9Line detected, which is longer than the defined maximum line length in the code style.
47
48 fun updateCounts(dependentId: String? = null): Boolean {
49 // First we need to check for user SignIn and then we have to check for the configuration
50 if (!(Session.isSignIn() && ConfigurationManager().getConfiguration().isFeatureEnabled(FeatureToggleType.HEALTH_PROFILE))) {
51 return false
52 }
53 // There is issue when this been called from both SyncActivity (first) and RootHostActivity (second)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/util/PhrUtil.kt:94:5Line detected, which is longer than the defined maximum line length in the code style.
91 repository.saveRecentDateTime(DateUtil.epochToDateWithTime(categoryCountItem.count.since))
92 }
93
94 fun createCountSinglesList(repository: PHRDetailedRepository, sourceType: String? = null): Single<List<HealthCategoryCount>> {
95 val healthCountSinglesList = repository.getEnabledHealthCategories().map {
96 // getHealthCategoryCountRemotely() can not return null, but Mockito does it
97 repository.getHealthCategoryCountRemotely(it, sourceType)?.withDefaultSchedulers()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/util/PhrUtil.kt:113:9Line detected, which is longer than the defined maximum line length in the code style.
110 HPAllergySeverity.MILD -> Pair(0, R.string.phr_severity_mild)
111 HPAllergySeverity.MODERATE -> Pair(R.color.phr_allergies_severity_moderate, R.string.phr_severity_moderate)
112 HPAllergySeverity.SEVERE -> Pair(R.color.phr_allergies_severity_severe, R.string.phr_severity_severe)
113 HPAllergySeverity.LIFE_THREATENING -> Pair(R.color.phr_allergies_severity_life_threatening, R.string.phr_severity_life_threatening)
114 HPAllergySeverity.FATAL -> Pair(R.color.phr_allergies_severity_fatal, R.string.phr_severity_fatal)
115 else -> Pair(0, 0)
116 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/util/analytics/phr/AllergiesAnalytics.kt:17:17Line detected, which is longer than the defined maximum line length in the code style.
14 itemId: String?,
15 searchTypeActionName: String = GeneralAnalytics.Action.ALLERGIES_SEARCH): ActionEvent {
16 return AnalyticsCore.action(searchTypeActionName)
17 .customParam(GeneralAnalytics.State.SEARCH_TYPE, GeneralSearchAnalytics.SearchType.PREDICTIVE.stringValue)
18 .customParam(GeneralAnalytics.State.SEARCH_WORD, searchWord)
19 .customParam(GeneralAnalytics.State.SEARCH_CONTENT, GeneralSearchAnalytics.SearchContent.ALLERGY.stringValue)
20 .customParam(GeneralAnalytics.State.ITEM_ID, itemId)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/util/analytics/phr/AllergiesAnalytics.kt:19:17Line detected, which is longer than the defined maximum line length in the code style.
16 return AnalyticsCore.action(searchTypeActionName)
17 .customParam(GeneralAnalytics.State.SEARCH_TYPE, GeneralSearchAnalytics.SearchType.PREDICTIVE.stringValue)
18 .customParam(GeneralAnalytics.State.SEARCH_WORD, searchWord)
19 .customParam(GeneralAnalytics.State.SEARCH_CONTENT, GeneralSearchAnalytics.SearchContent.ALLERGY.stringValue)
20 .customParam(GeneralAnalytics.State.ITEM_ID, itemId)
21 .customParam(GeneralAnalytics.State.ITEM_TYPE, ALLERGY_ITEM_TYPE_ANALYTICS)
22 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/util/analytics/phr/AllergiesAnalytics.kt:31:17Line detected, which is longer than the defined maximum line length in the code style.
28 return AnalyticsCore.action(searchTypeActionName)
29 .customParam(GeneralAnalytics.State.SEARCH_TYPE, GeneralSearchAnalytics.SearchType.MANUAL.stringValue)
30 .customParam(GeneralAnalytics.State.SEARCH_WORD, searchWord)
31 .customParam(GeneralAnalytics.State.SEARCH_CONTENT, GeneralSearchAnalytics.SearchContent.ALLERGY.stringValue)
32 .customParam(GeneralAnalytics.State.ITEM_TYPE, ALLERGY_ITEM_TYPE_ANALYTICS)
33 }
34
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/util/gdt/GdtFeatureCallbacks.kt:18:13Line detected, which is longer than the defined maximum line length in the code style.
15 */
16 override fun onAnalyticsPutContextData(contextData: MutableMap<String, Any>) {
17 try {
18 val greenDay = GreenDayRepositoryImpl.provideToExternalModule().getGreenDaySynchronously(DateTime.now().toTrackerDateString())
19 if (greenDay != null) {
20 contextData.put(GeneralAnalytics.ContextData.GREEN_DAY_AVERAGE, greenDay.trackersToGreenDay)
21 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/util/securitypin/AppLockUtil.kt:91:9Line detected, which is longer than the defined maximum line length in the code style.
88 @JvmStatic
89 fun checkIfPinRequiredInConfiguration(): Boolean {
90 var result = false
91 val featureConfiguration = ConfigurationManager().getConfiguration().getFeatureConfiguration(FeatureConfigurationType.PIN_CODE)
92 if (featureConfiguration is PinCodeConfiguration) {
93 result = featureConfiguration.mandatory
94 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/view/InAppNotificationLayout.kt:58:9Line detected, which is longer than the defined maximum line length in the code style.
55 val matrix = DisplayMetrics()
56 (context?.getSystemService(Context.WINDOW_SERVICE) as WindowManager).defaultDisplay.getMetrics(matrix)
57
58 val startPoint: Float = (-(binding.customView.layoutParams.height + resources.getDimension(R.dimen.spacing_xl))).toFloat()
59 val endPoint: Float = resources.getDimension(R.dimen.spacing_s)
60
61 val objectAnimator: ObjectAnimator = if (!hide) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/view/mcq/McqNumberInputLayout.kt:109:9Line detected, which is longer than the defined maximum line length in the code style.
106 private var mPattern: Pattern = Pattern.compile("[0-9]{0," + digitsBeforeZero + "}+" +
107 "((\\.[0-9]{0," + digitsAfterZero + "})?)||(\\.)?")
108
109 override fun filter(source: CharSequence, start: Int, end: Int, dest: Spanned, dstart: Int, dend: Int): CharSequence? {
110 val matcher: Matcher = mPattern.matcher(dest)
111 return if (!matcher.matches()) "" else null
112 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/view/mcq/McqQuestionLayout.kt:37:9Line detected, which is longer than the defined maximum line length in the code style.
34
35 init {
36 inflate()
37 maxAnswersAllowed = (attributes?.get(TemplateAttributeName.MCQ_SUBMIT_MAX_OPTIONS.value).toString()).toDouble().toInt()
38 minAnswersAllowed = (attributes?.get(TemplateAttributeName.MCQ_SUBMIT_MIN_OPTIONS.value).toString()).toDouble().toInt()
39 setupQuestions(attributes)
40 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/view/mcq/McqQuestionLayout.kt:38:9Line detected, which is longer than the defined maximum line length in the code style.
35 init {
36 inflate()
37 maxAnswersAllowed = (attributes?.get(TemplateAttributeName.MCQ_SUBMIT_MAX_OPTIONS.value).toString()).toDouble().toInt()
38 minAnswersAllowed = (attributes?.get(TemplateAttributeName.MCQ_SUBMIT_MIN_OPTIONS.value).toString()).toDouble().toInt()
39 setupQuestions(attributes)
40 }
41
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/view/mcq/McqQuestionLayout.kt:95:13Line detected, which is longer than the defined maximum line length in the code style.
92 binding.radiobuttonContainer.removeAllViewsInLayout()
93 questions.forEach { it ->
94 val itemView = View.inflate(context, R.layout.template_component_radio_button, null)
95 val layoutParams = RadioGroup.LayoutParams(RadioGroup.LayoutParams.MATCH_PARENT, RadioGroup.LayoutParams.WRAP_CONTENT).apply {
96 leftMargin = resources.getDimensionPixelSize(R.dimen.spacing_m)
97 rightMargin = resources.getDimensionPixelSize(R.dimen.spacing_m)
98 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/view/mcq/McqQuestionLayout.kt:126:13Line detected, which is longer than the defined maximum line length in the code style.
123 checkBoxes.clear()
124 binding.checkboxContainer.removeAllViewsInLayout()
125 questions.forEach { it ->
126 val checkBoxBinding: TemplateComponentCheckBoxBinding = DataBindingUtil.inflate(LayoutInflater.from(context),
127 R.layout.template_component_check_box, binding.checkboxContainer, false)
128 checkBoxBinding.checkBox.apply {
129 setOnCheckedChangeListener(null)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/view/mcq/McqSelectionInputLayout.kt:41:9Line detected, which is longer than the defined maximum line length in the code style.
38 private fun initAttributes(attributes: LinkedTreeMap<String, Any>?) {
39 buttonAction.invoke()
40 options = attributes?.get(TemplateAttributeName.MCQ_OPTIONS.value) as List<Option>
41 val arrayAdapter = ArrayAdapter<String>(context, layout.row_spn_dropdown, options.filter { !it.title.isNullOrEmpty() }.map { it.title })
42 with(binding) {
43 spinner.setDropDownBackgroundResource(color.surface)
44 textContainer.hint = attributes[TemplateAttributeName.MCQ_WIDGET_LABEL_TEXT.value].toString()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/view/mcq/PollView.kt:59:9Line detected, which is longer than the defined maximum line length in the code style.
56 }
57
58 fun highlightOption() {
59 binding.poll.progressTintList = ColorStateList.valueOf(ContextCompat.getColor(context!!, R.color.textBar_highlighted))
60 }
61
62 fun hideScore() {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/view/yourrealage/presenter/YourRealAgePresenter.kt:7:1Line detected, which is longer than the defined maximum line length in the code style.
4 import com.sharecare.realgreen.view.yourrealage.YourRealAgeTabItem
5 import com.sharecare.realgreen.view.yourrealage.ui.YourRealAgeView
6
7 class YourRealAgePresenter(private val isRatCompleted: Boolean, private val isProgramsVisible: Boolean) : BasePresenter<YourRealAgeView>() {
8
9 fun initTabs() {
10 val map = addTabs(isRatCompleted, isProgramsVisible)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/view/yourrealage/score/ui/ScoreFragment.kt:74:17Line detected, which is longer than the defined maximum line length in the code style.
71 presenter?.onClickViewFullReport()
72 }
73 updateRealage.setOnClickListener {
74 RATScreenDeciderActivity.startFromFragment(this@ScoreFragment, RATScreenDeciderActivity.StartType.GO_TO_TEST_ONLY)
75 }
76 }
77 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/view/yourrealage/score/ui/ScoreFragment.kt:151:13Line detected, which is longer than the defined maximum line length in the code style.
148 intentShareFile.flags = Intent.FLAG_ACTIVITY_NO_HISTORY
149 intentShareFile.putExtra(Intent.EXTRA_STREAM, uri)
150 intentShareFile.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.real_age_report))
151 intentShareFile.putExtra(Intent.EXTRA_TEXT, getString(R.string.real_age_des_attach, PreferenceStore.getUserName()))
152 startActivity(Intent.createChooser(intentShareFile, getString(R.string.real_age_share_via)))
153 }
154 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/view/yourrealage/score/ui/ScoreFragment.kt:158:33Line detected, which is longer than the defined maximum line length in the code style.
155
156 private fun showDialogItems(title: String, description: String, context: Context,
157 firstActionText: String, secondActionText: String,
158 firstActionListener: View.OnClickListener, secondActionListener: View.OnClickListener): AlertDialog {
159 val builder = MaterialAlertDialogBuilder(context)
160 val dialogViewBinding = DataBindingUtil.inflate<ViewCustomDialogBinding>(LayoutInflater.from(context), R.layout.view_custom_dialog, null, false)
161 builder.setView(dialogViewBinding.root)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/main/java/com/sharecare/realgreen/view/yourrealage/score/ui/ScoreFragment.kt:160:9Line detected, which is longer than the defined maximum line length in the code style.
157 firstActionText: String, secondActionText: String,
158 firstActionListener: View.OnClickListener, secondActionListener: View.OnClickListener): AlertDialog {
159 val builder = MaterialAlertDialogBuilder(context)
160 val dialogViewBinding = DataBindingUtil.inflate<ViewCustomDialogBinding>(LayoutInflater.from(context), R.layout.view_custom_dialog, null, false)
161 builder.setView(dialogViewBinding.root)
162 val dialog = builder.create()
163 with(dialogViewBinding) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/test/java/com/sharecare/realgreen/assets/templates/UtTemplateAssetsTest.kt:48:13Line detected, which is longer than the defined maximum line length in the code style.
45
46 should("should not contain any templates") {
47 runBlocking {
48 val itemRecord: List<ItemRecord> = jsonElement.asJsonObject["feedItems"].asJsonArray.map { gson.fromJson(it, Item::class.java) }.map { ItemRecordsFactory.createItemRecords(it).first() }
49 itemRecord.size shouldNotBe 0
50 val templates: List<TemplateComponent> = itemRecord.filter { it.itemType == ItemType.TEMPLATE.id }.map { it.getData(ContentRecordData::class.java)!!.body }
51 templates.size shouldNotBe 0
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/test/java/com/sharecare/realgreen/assets/templates/UtTemplateAssetsTest.kt:50:13Line detected, which is longer than the defined maximum line length in the code style.
47 runBlocking {
48 val itemRecord: List<ItemRecord> = jsonElement.asJsonObject["feedItems"].asJsonArray.map { gson.fromJson(it, Item::class.java) }.map { ItemRecordsFactory.createItemRecords(it).first() }
49 itemRecord.size shouldNotBe 0
50 val templates: List<TemplateComponent> = itemRecord.filter { it.itemType == ItemType.TEMPLATE.id }.map { it.getData(ContentRecordData::class.java)!!.body }
51 templates.size shouldNotBe 0
52 println("num of templates " + templates.size)
53 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/test/java/com/sharecare/realgreen/presenter/achieve/programs/AchieveProgramsPresenterTest.kt:37:9Line detected, which is longer than the defined maximum line length in the code style.
34
35 @Test
36 fun getPrograms() {
37 Mockito.doReturn(Single.just<BenefitsResponse>(MockUtil.getBenefitsResponse(AchieveProgramPresenter.SC_DIGITAL)))
38 .`when`<BenefitsHubRepository>(mockRepository)
39 .getBenefitsResponse()
40
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/test/java/com/sharecare/realgreen/presenter/achieve/programs/AchieveProgramsPresenterTest.kt:42:9Line detected, which is longer than the defined maximum line length in the code style.
39 .getBenefitsResponse()
40
41 presenter?.gotoBenefits()
42 Mockito.verify<AchieveProgramView>(mockMvpView).getProductsList(listOf(MockUtil.getFilteredProduct(AchieveProgramPresenter.SC_DIGITAL)))
43 }
44
45 @Test
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/test/java/com/sharecare/realgreen/presenter/seealltips/SeeAllTipsPresenterTest.kt:23:9Line detected, which is longer than the defined maximum line length in the code style.
20
21 private val rec = Recommendation().apply {
22 uri = "uri"; description = "description"; benefitCost = OLDER_TYPE; internalName = "internalName"
23 type = "type"; overview = "overview"; actionPlanId = "actionPlanId"; body = "body"; results = listOf("sharecare", "care"); tags = listOf("tags1", "tags2")
24 }
25
26 val list = listOf(rec)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/test/java/com/sharecare/realgreen/presenter/tips/TipsPresenterTest.kt:20:9Line detected, which is longer than the defined maximum line length in the code style.
17
18 private val rec = Recommendation().apply {
19 uri = "uri"; description = "description"; benefitCost = YOUNGER_TYPE; internalName = "internalName"
20 type = "type"; overview = "overview"; actionPlanId = "actionPlanId"; body = "body"; results = listOf("sharecare", "care"); tags = listOf("tags1", "tags2")
21 }
22
23 val list = listOf(rec)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/app/src/test/java/com/sharecare/realgreen/presenter/yourrealage/YourRealAgePresenterTest.kt:23:9Line detected, which is longer than the defined maximum line length in the code style.
20 ratReportPresenter = YourRealAgePresenter(isRatCompleted = true, isProgramsVisible = true)
21 ratReportPresenter.attachView(mockMvpView)
22 ratReportPresenter.initTabs()
23 val map = mutableMapOf(0 to YourRealAgeTabItem.SCORE, 1 to YourRealAgeTabItem.PROGRAM, 2 to YourRealAgeTabItem.TIPS)
24 Mockito.verify<YourRealAgeView>(mockMvpView).loadTabs(map)
25 }
26
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/TooltipTag.kt:44:21Line detected, which is longer than the defined maximum line length in the code style.
41 fun byElementId(id: String?): TooltipTag {
42 if (id == null) throw RuntimeException("Error parsing tooltip tag. ElementId is null.")
43 return values().firstOrNull { it.elementId.equals(id, ignoreCase = true) }
44 ?: throw RuntimeException("Unmatched ElementId \"$id\" in TooltipTags. Review the tooltip mappings.")
45 }
46 }
47
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/account/LegacyAccountRepositoryImpl.kt:22:5Line detected, which is longer than the defined maximum line length in the code style.
19
20 override fun getAccount(): Single<Account> = RxWrapperUtil.create<Account> { ssoService().account }
21
22 override fun handlePassword(flowMode: FlowMode?, password: String, currentPassword: String): Single<Boolean> = RxWrapperUtil.create {
23 when (flowMode) {
24 FlowMode.FORCED_OUT_OF_DATE, FlowMode.TEMP_PASSWORD_UPDATE -> ssoService().updatePassword(password)
25 FlowMode.USER_CHANGE_PASSWORD -> ssoService().changePassword(password)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/adapter/CountrySearchItemHolder.kt:33:13Line detected, which is longer than the defined maximum line length in the code style.
30
31 companion object {
32 fun create(parent: ViewGroup, listener: AlphabeticListListener): CountrySearchItemHolder {
33 val binding: ItemSearchCountryBinding = ItemSearchCountryBinding.inflate(LayoutInflater.from(parent.context),
34 parent, false)
35 return CountrySearchItemHolder(binding, listener)
36 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/adapter/OrganisationListDescViewHolder.kt:11:1Line detected, which is longer than the defined maximum line length in the code style.
8 import com.sharecare.realgreen.core.tool.listadapter.viewholder.BindableViewHolder
9
10
11 class OrganisationListDescViewHolder(private val binding: ItemDescriptionBinding, private val moreInfo: ItemClickListener<AuthItem>) : BindableViewHolder<AuthItem>(binding.root) {
12
13 override fun onBind(item: AuthItem) {
14 item as DescriptionItem
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/adapter/OrganisationListSectionViewHolder.kt:7:1Line detected, which is longer than the defined maximum line length in the code style.
4 import com.sharecare.realgreen.core.model.AuthItem
5 import com.sharecare.realgreen.core.tool.listadapter.viewholder.BindableViewHolder
6
7 class OrganisationListSectionViewHolder(private val binding: ItemSectionTitleBinding) : BindableViewHolder<AuthItem>(binding.root) {
8
9 override fun onBind(item: AuthItem) {
10 binding.title.text = item.getTitle()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/adapter/OrganisationsListAdapter.kt:12:1Line detected, which is longer than the defined maximum line length in the code style.
9 import com.sharecare.realgreen.core.tool.listadapter.ItemClickListener
10 import com.sharecare.realgreen.core.tool.listadapter.viewholder.BindableViewHolder
11
12 class OrganisationsListAdapter(items: List<AuthItem>, val onClick: ItemClickListener<AuthItem>) : FixedListAdapter<AuthItem, BindableViewHolder<AuthItem>>(items) {
13
14 override fun onCreateActualViewHolder(parent: ViewGroup, viewType: Int): BindableViewHolder<AuthItem> {
15 val inflater = LayoutInflater.from(parent.context)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/adapter/OrganisationsListAdapter.kt:17:13Line detected, which is longer than the defined maximum line length in the code style.
14 override fun onCreateActualViewHolder(parent: ViewGroup, viewType: Int): BindableViewHolder<AuthItem> {
15 val inflater = LayoutInflater.from(parent.context)
16 return when (viewType) {
17 TITLE -> OrganisationListSectionViewHolder(DataBindingUtil.inflate(inflater, R.layout.item_section_title, parent, false))
18 DESC -> OrganisationListDescViewHolder(DataBindingUtil.inflate(inflater, R.layout.item_description, parent, false), onClick)
19 else -> OrganisationListItemViewHolder(DataBindingUtil.inflate(inflater, R.layout.item_organisation,
20 parent, false), onClick)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/adapter/OrganisationsListAdapter.kt:18:13Line detected, which is longer than the defined maximum line length in the code style.
15 val inflater = LayoutInflater.from(parent.context)
16 return when (viewType) {
17 TITLE -> OrganisationListSectionViewHolder(DataBindingUtil.inflate(inflater, R.layout.item_section_title, parent, false))
18 DESC -> OrganisationListDescViewHolder(DataBindingUtil.inflate(inflater, R.layout.item_description, parent, false), onClick)
19 else -> OrganisationListItemViewHolder(DataBindingUtil.inflate(inflater, R.layout.item_organisation,
20 parent, false), onClick)
21 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/architecture/coroutines/ApplicationScope.kt:17:1Line detected, which is longer than the defined maximum line length in the code style.
14
15 @CoreComponent(type = ComponentType.Concurrency)
16
17 fun backgroundScope(): CoroutineScope = globalInjection().get<SupervisedScope>(named(GlobalKoins.SupervisedBackground)).second
18
19 @CoreComponent(type = ComponentType.Concurrency)
20
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/architecture/coroutines/ApplicationScope.kt:21:1Line detected, which is longer than the defined maximum line length in the code style.
18
19 @CoreComponent(type = ComponentType.Concurrency)
20
21 fun backgroundSupervisor(): CompletableJob = globalInjection().get<SupervisedScope>(named(GlobalKoins.SupervisedBackground)).first
22
23 @CoreComponent(type = ComponentType.Concurrency)
24
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/architecture/logs/LoggerExtensions.kt:19:5Line detected, which is longer than the defined maximum line length in the code style.
16 d("Screen measures ; trigger = $trigger")
17 v("Window -> w:${activity.windowDimensions().first} / h:${activity.windowDimensions().second}")
18 v("Default Display -> w:${activity.defaultDisplay().first} / h:${activity.defaultDisplay().second}")
19 v("Display (DPI) -> w:${activity.window!!.displayMetricsDPI().first}/ h:${activity.window!!.displayMetricsDPI().second}")
20 v("Display (Pixels) -> w:${activity.window!!.displayMetricsPixels().first}/ h:${activity.window!!.displayMetricsPixels().second}")
21 }
22
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/architecture/logs/LoggerExtensions.kt:20:5Line detected, which is longer than the defined maximum line length in the code style.
17 v("Window -> w:${activity.windowDimensions().first} / h:${activity.windowDimensions().second}")
18 v("Default Display -> w:${activity.defaultDisplay().first} / h:${activity.defaultDisplay().second}")
19 v("Display (DPI) -> w:${activity.window!!.displayMetricsDPI().first}/ h:${activity.window!!.displayMetricsDPI().second}")
20 v("Display (Pixels) -> w:${activity.window!!.displayMetricsPixels().first}/ h:${activity.window!!.displayMetricsPixels().second}")
21 }
22
23 fun Logger.logMeasures(views: List<Pair<View, String>>, trigger: String? = null) =
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/architecture/ui/api/ToolbarApi.kt:18:2Line detected, which is longer than the defined maximum line length in the code style.
15 }
16
17 /**
18 * Call this function within from a presenter to remove the toolbar during the active lifecycle of the view (most probably your fragment)
19 */
20
21 @CoreComponent(type = ComponentType.Fragment)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/architecture/ui/binding/ErrorContainerBinding.kt:39:1Line detected, which is longer than the defined maximum line length in the code style.
36 fun IncludeErrorBinding.standardBinding(live: LiveData<StandardScreenState>) = bind(liveBind(live))
37
38
39 private fun IncludeErrorBinding.bind(observer: ObservableBinding<IncludeErrorBinding, StandardScreenState>): ObservableBinding<IncludeErrorBinding, StandardScreenState> {
40 with(observer) {
41 onLoad { _, _, _ ->
42 errorContainer.visible = false
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/architecture/ui/binding/ErrorContainerBinding.kt:54:17Line detected, which is longer than the defined maximum line length in the code style.
51 errorContainer.removeAllViews()
52 errorContainer.visible = e.hasErrorContainer()
53 e.container?.apply {
54 val inflater = this@bind.root.context.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater
55 val errorView = inflater.inflate(errorContainerLayoutRes, null)
56 val titleView = errorView.findViewById<TextView>(R.id.title)
57 val messageView = errorView.findViewById<TextView>(R.id.message)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/architecture/ui/binding/ErrorPromptBinding.kt:28:1Line detected, which is longer than the defined maximum line length in the code style.
25 * Call this method in fragments onAttachBinding(..)
26 */
27
28 private fun ViewDataBinding.bind(observer: ObservableBinding<ViewDataBinding, StandardScreenState>): ObservableBinding<ViewDataBinding, StandardScreenState> {
29 with(observer) {
30
31 onError { _, phase, _, _ ->
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/architecture/ui/binding/LoaderContainerBinding.kt:31:1Line detected, which is longer than the defined maximum line length in the code style.
28 fun IncludeLoaderBinding.standardBinding(live: LiveData<StandardScreenState>) = bind(liveBind(live))
29
30
31 private fun IncludeLoaderBinding.bind(observer: ObservableBinding<IncludeLoaderBinding, StandardScreenState>): ObservableBinding<IncludeLoaderBinding, StandardScreenState> {
32 with(observer) {
33 //on transition to loading we show the container
34 onLoad { _, _, _ ->
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/architecture/ui/navigation/navigation/BackEventHandler.kt:12:5Line detected, which is longer than the defined maximum line length in the code style.
9 * Override to add custom back press behavior and/or a custom UI triggered back behavior
10 * Return true if consumed false otherwise
11 */
12 fun onBackPress(viewClass: KClass<out NavFragment<*>>?, navigator: RootNavigator = RootNavigator::class.inject()): Boolean = navigator.pop()
13
14
15 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/architecture/ui/navigation/navigation/BackEventHandler.kt:20:5Line detected, which is longer than the defined maximum line length in the code style.
17
18 interface BackEventHandlerLegacy {
19
20 fun onBackPress(viewClass: KClass<out NavFragment<*>>?, navigator: RootNavigator = RootNavigator::class.inject()): Boolean = navigator.pop()
21
22
23 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/architecture/ui/navigation/navigation/NavComponentInjections.kt:26:5Line detected, which is longer than the defined maximum line length in the code style.
23 noinline parameters: ParametersDefinition? = null
24 ): VM {
25 val store = (this as Fragment).findNavController().getViewModelStoreOwner(navGraphId).viewModelStore
26 return getKoin().getViewModel(qualifier = qualifier, clazz = VM::class, parameters = parameters, owner = { ViewModelOwner(store) })
27 }
28
29
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/architecture/ui/navigation/navigation/NavFragment.kt:30:2Line detected, which is longer than the defined maximum line length in the code style.
27 *
28 * IMPORTANT:
29 * Because multiple layers of inheritance are evil all new fragments should directly inherit this class.
30 * If this restriction is blocking you: please reach out to the team and we will figure out a way to achieve things using composition patterns.
31 *
32 * STATUS:
33 * Currently not all functionality of legacy base fragments are ported to NavFragment -> please notify the team lead when something is missing.
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/architecture/ui/navigation/navigation/NavFragment.kt:33:2Line detected, which is longer than the defined maximum line length in the code style.
30 * If this restriction is blocking you: please reach out to the team and we will figure out a way to achieve things using composition patterns.
31 *
32 * STATUS:
33 * Currently not all functionality of legacy base fragments are ported to NavFragment -> please notify the team lead when something is missing.
34 *
35 */
36 @CoreComponent
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/architecture/ui/navigation/navigation/NavFragment.kt:70:9Line detected, which is longer than the defined maximum line length in the code style.
67 @Review("Access rule appliance")
68 override fun onCreate(savedInstanceState: Bundle?) {
69 super.onCreate(savedInstanceState)
70 i("OnCreate fragment ${this::class.simpleName} - ${this.hashCode()}. Current destination ${requireNavigation().currentDestination}")
71 applyAccessRules(this)
72 }
73
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/architecture/ui/navigation/navigation/NavFragment.kt:75:5Line detected, which is longer than the defined maximum line length in the code style.
72 }
73
74
75 override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?) = binding.root
76
77 override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
78 super.onViewCreated(view, savedInstanceState)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/architecture/ui/navigation/navigation/NavHostApi.kt:43:6Line detected, which is longer than the defined maximum line length in the code style.
40 /**
41 * Needs to be called in activity onCreate(..)
42 * This implementation creates a koin scope in sync with the nav host activity lifecycle.
43 * Within this scope we make the nav host activity accessible (injectable/locatable) by exposing its interface to koin.
44 * Likewise we declare the host's nav controller within koin.
45 * Both can thus get injected as long as the host activity is between on create and destroy. Violating this restriction will most probably crash the app during development.
46 * If there was (there should not) a second host instance the later will override the dep declarations and prevent leaks. This will might happen on app crashes.
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/architecture/ui/navigation/navigation/NavHostApi.kt:45:6Line detected, which is longer than the defined maximum line length in the code style.
42 * This implementation creates a koin scope in sync with the nav host activity lifecycle.
43 * Within this scope we make the nav host activity accessible (injectable/locatable) by exposing its interface to koin.
44 * Likewise we declare the host's nav controller within koin.
45 * Both can thus get injected as long as the host activity is between on create and destroy. Violating this restriction will most probably crash the app during development.
46 * If there was (there should not) a second host instance the later will override the dep declarations and prevent leaks. This will might happen on app crashes.
47 */
48 fun createScope(controller: NavController) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/architecture/ui/navigation/navigation/NavHostApi.kt:46:6Line detected, which is longer than the defined maximum line length in the code style.
43 * Within this scope we make the nav host activity accessible (injectable/locatable) by exposing its interface to koin.
44 * Likewise we declare the host's nav controller within koin.
45 * Both can thus get injected as long as the host activity is between on create and destroy. Violating this restriction will most probably crash the app during development.
46 * If there was (there should not) a second host instance the later will override the dep declarations and prevent leaks. This will might happen on app crashes.
47 */
48 fun createScope(controller: NavController) {
49 val navScope = getKoin().createScope(KoinScopes.NavScope.id, named(KoinScopes.NavScope.name))
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/architecture/ui/navigation/navigation/NavHostApi.kt:80:2Line detected, which is longer than the defined maximum line length in the code style.
77 * I.e class extending activity and implementing NavHostApi.
78 *
79 * (Currently (Apr. 22) there are only two matching definitions: NavHostActivity and DevHostActivity.
80 * DevHostActivity is non production code and can be used during UI development whenever sensible (prototyping, complex UI behaviors, motions, demos, etc..).
81 *
82 * To start (or navigate to) to views impl. via nav components only this function should be used.
83 * Example: NavHostActivity::class.start(context, MainGraphDirections.toModalMoreInfo(fieldAttributes.text!!))
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/architecture/ui/navigation/navigation/NavHostApi.kt:85:2Line detected, which is longer than the defined maximum line length in the code style.
82 * To start (or navigate to) to views impl. via nav components only this function should be used.
83 * Example: NavHostActivity::class.start(context, MainGraphDirections.toModalMoreInfo(fieldAttributes.text!!))
84 *
85 * @param context should be a view context // TODO: (2022-04-26 08:30) Do: Test launch with app, service, receiver context | When: needed
86 * @param directions expects 1:n directions generated by safe args.
87 *
88 * The first direction has to reflect/target a node from the MainGraph.
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/architecture/ui/navigation/navigation/NavHostApi.kt:89:2Line detected, which is longer than the defined maximum line length in the code style.
86 * @param directions expects 1:n directions generated by safe args.
87 *
88 * The first direction has to reflect/target a node from the MainGraph.
89 * Then, if navigation to nested graphs is needed: An additional direction accessible/owned by the child layer (i.e. the nested graph) is expected.
90 * For each lower level this rules applies.
91 * It is possible to pass arguments to target destination.
92 *
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/architecture/ui/navigation/navigation/ObservableBinding.kt:45:1Line detected, which is longer than the defined maximum line length in the code style.
42 */
43 @CoreComponent
44
45 class FlowBinding<B : ViewDataBinding, T : ScreenState>(clazz: KClass<out B>, private val flow: Flow<T>) : ObservableBinding<B, T>(clazz) {
46 override fun init(v: FragmentApi) {
47 v.requireScope().launchWhenStarted {
48 try {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/architecture/ui/navigation/navigation/ObservableBinding.kt:54:25Line detected, which is longer than the defined maximum line length in the code style.
51 try {
52 onValue(v, old, new)
53 } catch (e: Exception) {
54 v.requireLogger().e("Error binding flow of type ${new::class.simpleName} for layout ${clazz}: ${e.message}", e)
55 }
56 old = new
57 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/architecture/ui/navigation/navigation/ObservableBinding.kt:59:17Line detected, which is longer than the defined maximum line length in the code style.
56 old = new
57 }
58 }catch (e: Exception) {
59 v.requireLogger().e("Error launching binding for ${clazz.simpleName} for layout ${clazz}: ${e.message}", e)
60 }
61 }
62 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/architecture/ui/navigation/navigation/ObservableBinding.kt:126:13Line detected, which is longer than the defined maximum line length in the code style.
123 if (bindingCounter == 1) create(api, old, new)
124 if (old is StandardScreenState && new is StandardScreenState) {
125 if (new.phase is ScreenPhase.Normal && old.phase !is ScreenPhase.Normal) normal(api, old, new)
126 if (new.phase is ScreenPhase.Error && old.phase !is ScreenPhase.Error) error(api, new.phase as ScreenPhase.Error, old, new)
127 if (new.phase is ScreenPhase.Loading && old.phase !is ScreenPhase.Loading) load(api, old, new)
128 }
129 update(api, old, new)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/architecture/ui/navigation/navigation/ObservableEvents.kt:29:21Line detected, which is longer than the defined maximum line length in the code style.
26 try {
27 api.requireViewLifecycleOwner().lifecycleScope.launchWhenCreated {
28 try {
29 source.eventFlow.flatMapMerge { state -> state.events.filterNot { item -> item.consumed }.asFlow() }.distinctUntilChanged().collect { event ->
30 onAction(event)
31 }
32 } catch (e: Exception) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/architecture/ui/navigation/navigation/ObservableNavigation.kt:26:1Line detected, which is longer than the defined maximum line length in the code style.
23 }.observe()
24
25 @CoreComponent(type = ComponentType.Navigation)
26 class FlowNavigation(private val api: FragmentApi, private val source: NavigationSource) : ObservableNavigation(api, source) {
27
28 override fun observe(): ObservableNavigation {
29 try {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/architecture/ui/navigation/navigation/ObservableNavigation.kt:32:21Line detected, which is longer than the defined maximum line length in the code style.
29 try {
30 api.requireScope().launchWhenStarted {
31 try {
32 source.navFlow.map { it.navigation }.filterNotNull().filterNot { item -> item.consumed }.collect { item ->
33 onNavigation(item)
34 }
35 } catch (e: Exception) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/architecture/ui/navigation/navigation/ObservableNavigation.kt:94:9Line detected, which is longer than the defined maximum line length in the code style.
91 }
92
93 fun missingNavigation(destination: Any) {
94 e("${api::class.simpleName} has no navigation implementation for destination ${destination::class.simpleName} : $destination")
95 }
96
97 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/architecture/ui/navigation/navigation/Router.kt:14:1Line detected, which is longer than the defined maximum line length in the code style.
11 import com.sharecare.realgreen.core.architecture.params.androidLogger
12
13 @Navigator.Name("router")
14 class Router(private val controller: NavController, params: GlobalParams = GlobalParams::class.inject(), logger: Logger = params.androidLogger()) : Navigator<Router.RouterDestination>(), Logger by logger {
15
16 override fun createDestination(): RouterDestination = RouterDestination(this)
17
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/architecture/ui/navigation/navigation/Router.kt:18:5Line detected, which is longer than the defined maximum line length in the code style.
15
16 override fun createDestination(): RouterDestination = RouterDestination(this)
17
18 override fun navigate(destination: RouterDestination, args: Bundle?, navOptions: NavOptions?, navigatorExtras: Extras?): NavDestination? {
19 try {
20 if (args == null || !args.containsKey(ROUTE)) throw IllegalStateException("No route arg provided")
21 val route = args.getIntArray(ROUTE)!!.toMutableList()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/architecture/ui/navigation/navigation/Router.kt:32:13Line detected, which is longer than the defined maximum line length in the code style.
29 }
30 args.getBundle(targetId.toString())?.let { this.putAll(it) }
31 }
32 val targetNavigator: Navigator<NavDestination> = controller.navigatorProvider.getNavigator(targetNode.navigatorName)
33 return targetNavigator.navigate(targetNode, targetArgs, navOptions, navigatorExtras)
34 } catch (e: Exception) {
35 e(e)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/architecture/ui/navigation/navigation/WebNavigator.kt:23:9Line detected, which is longer than the defined maximum line length in the code style.
20 */
21 fun navigateToWeb(
22 url: String,
23 isTrackingSiteExit: Boolean = false, analyticsInfo: FeedItemAnalyticsInfo? = null, enrolmentWebView: Boolean = false,
24 forceAuthWrap: Boolean = false, accountCreation: Boolean = false,
25 data: UserAccountData? = null
26 )
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/architecture/ui/navigation/navigation/authorization/AuthenticatedAccess.kt:33:13Line detected, which is longer than the defined maximum line length in the code style.
30 override fun applyAccessRules(api: FragmentApi) = api.requireLifecycle().addObserver(object : LifecycleObserver {
31 private fun authCheck() {
32 d("Performing auth check...")
33 if (params.enableAuthCheck && !isAuthenticated()) { //FIXME check if we have configuration [AuthenticatedActivity]
34 w("Auth check failed Automatic user logout")
35 api.logout(false)
36 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/architecture/ui/navigation/navigation/authorization/AuthenticatedAccess.kt:51:21Line detected, which is longer than the defined maximum line length in the code style.
48 fun registerReceiver() {
49 if (isAuthenticated()) {
50 try {
51 api.requireCtx().registerReceiver(failureReceiver, IntentFilter(LogoutEventHandler.ACTION_AUTHORIZATION_FAILED))
52 } catch (e: Exception) {
53 e("Failed to register auth failure receiver ${failureReceiver::class.simpleName} in on pause", e)
54 throw e //TODO should we really rethrow here?
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/architecture/ui/navigation/navigation/authorization/AuthorizationAnalytics.kt:21:9Line detected, which is longer than the defined maximum line length in the code style.
18 }
19
20 fun onViewPasswordTipsScreen() {
21 AnalyticsCore.pageView(GeneralAnalytics.Page.PASSWORD_TIPS).siteSectionAndContentType(GeneralAnalytics.Page.REGISTRATION)
22 }
23
24 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/architecture/ui/state/ScreenPhase.kt:25:5Line detected, which is longer than the defined maximum line length in the code style.
22 val e: Exception? = null,
23 val prompt: ErrorPromptModel? = null,
24 val container: ErrorContainerModel? = null,
25 ) : ScreenPhase(), ErrorContainerModel by container ?: NullErrorContainer(), ErrorPromptModel by prompt ?: NullErrorPromptModel() {
26 fun hasErrorPrompt() = prompt != null
27 fun hasErrorContainer() = container != null
28 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/architecture/ui/state/standard/container/RetryErrorContainer.kt:13:5Line detected, which is longer than the defined maximum line length in the code style.
10 @CoreComponent(type = ComponentType.Binding)
11 data class RetryErrorContainer(
12 override val errorContainerLayoutRes: Int = R.layout.view_error,
13 override val errorContainerIcon: Drawable? = AppCompatResources.getDrawable(appContext(), R.drawable.ic_tofu_cloud_off),
14 override val errorContainerTitle: String? = appContext().getString(R.string.something_went_wrong),
15 override val errorContainerMsg: String? = appContext().getString(R.string.please_try_again),
16 override val errorContainerActionTitle: String? = appContext().getString(R.string.btn_retry),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/architecture/ui/viewmodel/BaseViewModel.kt:36:5Line detected, which is longer than the defined maximum line length in the code style.
33 private val fragmentResultFlow: SharedFlow<Pair<String, Bundle>?> = MutableSharedFlow()
34
35 @Suppress("MemberVisibilityCanBePrivate")
36 fun createFragmentResultFlow(key: FragmentResultKey): Flow<Bundle> = fragmentResultFlow.filterNotNull().filter { it.first == key.toString() }.map { it.second }
37
38 @Suppress("MemberVisibilityCanBePrivate")
39 suspend fun awaitFragmentResult(key: FragmentResultKey, lambda: suspend (data: Bundle) -> Unit) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/auth/Session.kt:10:5Line detected, which is longer than the defined maximum line length in the code style.
7 @CoreComponent(msg = "Used to know about the current login session.", type = ComponentType.User)
8 object Session {
9
10 /*
11 * We need to verify not only if we have the Ticket object but also access token as we may have some temporary informations
12 * in scenario when user is not yet fully authorized/enabled
13 * */
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/base/BundleExtensions.kt:11:1Line detected, which is longer than the defined maximum line length in the code style.
8 import com.sharecare.realgreen.core.tool.annotations.UtilityType
9 import java.io.Serializable
10
11 @Utility(msg = "Extension class for Activity/Fragments to set bundle data to Activity/Fragment ", type = UtilityType.Extensions)
12
13 fun <T : Serializable> Activity.getSerializable(bundle: Bundle?, extraString: String): T? {
14 val properBundle = getBundle(bundle)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/base/EssentialActivity.kt:278:5Line detected, which is longer than the defined maximum line length in the code style.
275 updateErrorLayout(errorContainer, layoutId, 0, null, null, null, listener)
276 }
277
278 private fun updateErrorLayout(errorContainer: FrameLayout, layoutId: Int, listener: View.OnClickListener?, title: String?, message: String?) {
279 updateErrorLayout(errorContainer, layoutId, 0, title, message, null, listener)
280 }
281
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/base/EssentialFragment.kt:123:5Line detected, which is longer than the defined maximum line length in the code style.
120 updateErrorLayout(errorContainer, layoutId, 0, null, null, null, listener)
121 }
122
123 private fun updateErrorLayout(errorContainer: FrameLayout, layoutId: Int, listener: View.OnClickListener?, title: String?, message: String?) {
124 updateErrorLayout(errorContainer, layoutId, 0, title, message, null, listener)
125 }
126
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/base/phr/PHRSectionActivity.kt:48:5Line detected, which is longer than the defined maximum line length in the code style.
45 phrSectionMeta = requireArguments().getSerializable(EXTRA_PHR_SECTION_META) as SECTIONMETA
46 }
47
48 override fun showItemWasMessage(action: PHRItemAction) = showMessage(getString(action.messageId, getString(phrSectionMeta.itemTitle)))
49
50 @SuppressLint("StringFormatInvalid")
51 override fun deleteItemWithConfirmation(invoker: View,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/configuration/ConfigurationManager.kt:97:17Line detected, which is longer than the defined maximum line length in the code style.
94
95 fun getConfigurationHost(defaultConfigurationHost: String) =
96 if (BuildConfig.DEBUG) {
97 PreferenceStore.getSharecareEnvKey()?.getConfigurationEndpointBasedOnMarket(PreferenceStore.getMarketSelection()
98 ?: MarketConfiguration.US)
99 ?: defaultConfigurationHost
100 } else {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/configuration/VersionNameUtil.kt:24:9Line detected, which is longer than the defined maximum line length in the code style.
21 var isSupported = true
22
23 val currentNumbers = currentVersionName.split("\\.".toRegex()).dropLastWhile { it.isEmpty() }.toTypedArray()
24 val minSupportedNumbers = minSupportedVersionName.split("\\.".toRegex()).dropLastWhile { it.isEmpty() }.toTypedArray()
25
26 val digitsToCompare = 4
27 for (i in 0 until digitsToCompare) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/content/DynamicFeedDetailsFragment.kt:16:1Line detected, which is longer than the defined maximum line length in the code style.
13 * This class is used to handle Group info for the feed item
14 * If feed contains Group info, we can consider as Dynamic feed
15 * Enable GotoSeeAll view for the user to navigate to see all feed for the group, if the feed has Group info */
16 open class DynamicFeedDetailsFragment<P : DynamicFeedDetailsPresenter<V>, V : DynamicFeedDetailsMvpView> : BaseFragment<P, V>() {
17
18 var itemRecordServerId: String? = null
19
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/content/adapter/CardViewHolder.kt:39:5Line detected, which is longer than the defined maximum line length in the code style.
36 @JvmField
37 var footerView: ViewGroup? = itemView.findViewById(R.id.footer)
38
39 abstract fun initialize(activity: Activity?, itemRecord: ItemRecord?, navigationAwayAllowed: Boolean, feedEventsHandler: FeedEventsHandler?, feedImpressionEventsHandler: FeedImpressionEventsHandler?, position: Int)
40
41 public override fun onInit(activity: Activity?, itemRecord: ItemRecord, navigationAwayAllowed: Boolean,
42 feedEventsHandler: FeedEventsHandler, feedImpressionEventsHandler: FeedImpressionEventsHandler?, position: Int) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/content/adapter/CardViewHolder.kt:42:32Line detected, which is longer than the defined maximum line length in the code style.
39 abstract fun initialize(activity: Activity?, itemRecord: ItemRecord?, navigationAwayAllowed: Boolean, feedEventsHandler: FeedEventsHandler?, feedImpressionEventsHandler: FeedImpressionEventsHandler?, position: Int)
40
41 public override fun onInit(activity: Activity?, itemRecord: ItemRecord, navigationAwayAllowed: Boolean,
42 feedEventsHandler: FeedEventsHandler, feedImpressionEventsHandler: FeedImpressionEventsHandler?, position: Int) {
43 initialize(activity, itemRecord, navigationAwayAllowed, feedEventsHandler, feedImpressionEventsHandler, position)
44 vPin?.setImageResource(if (itemRecord.isPinned) {
45 R.drawable.ic_tofu_bookmark_on
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/content/adapter/CardViewHolder.kt:43:9Line detected, which is longer than the defined maximum line length in the code style.
40
41 public override fun onInit(activity: Activity?, itemRecord: ItemRecord, navigationAwayAllowed: Boolean,
42 feedEventsHandler: FeedEventsHandler, feedImpressionEventsHandler: FeedImpressionEventsHandler?, position: Int) {
43 initialize(activity, itemRecord, navigationAwayAllowed, feedEventsHandler, feedImpressionEventsHandler, position)
44 vPin?.setImageResource(if (itemRecord.isPinned) {
45 R.drawable.ic_tofu_bookmark_on
46 } else {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/content/adapter/ContentAdapter.kt:26:1Line detected, which is longer than the defined maximum line length in the code style.
23 import com.sharecare.realgreen.core.tool.L
24 import com.sharecare.realgreen.core.util.analytics.feed.ImpressionTracker
25
26 open class ContentAdapter(private val activity: Activity?, private val items: MutableList<Content?>, private val impressionTracker: ImpressionTracker?) : RecyclerView.Adapter<RecyclerView.ViewHolder>() {
27
28 internal var recyclerView: RecyclerView? = null
29 var isLoading = false
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/content/adapter/FeedBindableViewHolder.kt:15:5Line detected, which is longer than the defined maximum line length in the code style.
12 var recyclerView: RecyclerView? = null
13 var groupViewPosition: Int? = null
14
15 fun bind(item: ItemRecord, activity: Activity, feedEventsHandler: FeedEventsHandler, feedImpressionEventsHandler: FeedImpressionEventsHandler, position: Int) {
16 this.item = item
17 onBind(item, activity, feedEventsHandler, feedImpressionEventsHandler, position)
18 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/content/adapter/FeedBindableViewHolder.kt:23:5Line detected, which is longer than the defined maximum line length in the code style.
20 override fun onBind(item: ItemRecord) {
21 }
22
23 protected abstract fun onBind(item: ItemRecord, activity: Activity, feedEventsHandler: FeedEventsHandler, feedImpressionEventsHandler: FeedImpressionEventsHandler, position: Int)
24
25 }
26
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/content/article/ArticleDetailsActivity.kt:206:9Line detected, which is longer than the defined maximum line length in the code style.
203 .replace("{placeholder}", "%s"),
204 article?.url, article?.title, article?.description)
205
206 NavigatorCoreUtil.toShareText(requireContext(), getString(R.string.article_share_subject), HtmlTool.fromHtml(message))
207 AppRater.isFeedItemShared = true
208
209 val analyticsInfo = FeedItemAnalyticsInfo.fromArguments(requireArguments())
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/content/place/PlacesAdapter.kt:8:1Line detected, which is longer than the defined maximum line length in the code style.
5 import androidx.recyclerview.widget.RecyclerView
6 import com.feingoldtech.models.content.MapPlace
7
8 class PlacesAdapter(val list: List<MapPlace>, val listener: OnPlaceClickListener) : RecyclerView.Adapter<PlacesViewHolder>() {
9
10 override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) =
11 PlacesViewHolder.create(LayoutInflater.from(parent.context), parent)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/content/place/PlacesViewHolder.kt:16:9Line detected, which is longer than the defined maximum line length in the code style.
13
14 companion object {
15 private const val SEPARATOR = " - "
16 fun create(inflater: LayoutInflater, parent: ViewGroup) = PlacesViewHolder(PlaceItemViewBinding.inflate(inflater, parent, false))
17 }
18
19 fun onBind(place: MapPlace, listener: PlacesAdapter.OnPlaceClickListener) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/content/slideshow/list/SlideshowPresenter.kt:13:1Line detected, which is longer than the defined maximum line length in the code style.
10 import com.sharecare.realgreen.tool.realminteraction.getData
11 import io.reactivex.functions.Consumer
12
13 class SlideshowPresenter(private val repository: SlideshowRepository) : DynamicFeedDetailsPresenter<SlideshowMvpView>() {
14 private var slideshow: DetailedSlideshow? = null
15
16 fun getSlideshow(contentId: String, itemRecord: ItemRecord?) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/content/video/VideoPlayerConfiguration.kt:5:9Line detected, which is longer than the defined maximum line length in the code style.
2
3 object VideoPlayerConfiguration {
4 const val POLICY_KEY =
5 "BCpkADawqM2zMYf32Fkc79SNnO7d4QkJRYPht82SPLeQSUFyiUa5BCwM3moc-BqDK0Ue8uhor2ArAgIj4-9BqikdYK2QVxC1CXTsao6lSdUiGh3TM_x_imRllxVjGs_JdFMwD08LRmg5D4Vw"
6 const val USER_ID = "1569565975001"
7 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/content/video/VideoViewHolder.kt:125:13Line detected, which is longer than the defined maximum line length in the code style.
122
123 override fun initialize(
124 activity: Activity?, itemRecord: ItemRecord?, navigationAwayAllowed: Boolean,
125 feedEventsHandler: FeedEventsHandler?, feedImpressionEventsHandler: FeedImpressionEventsHandler?, position: Int
126 ) {
127 val video = itemRecord?.getData(VideoItemRecordData::class.java)
128 videoItemRecordData = video
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/content/video/VideoViewHolder.kt:455:25Line detected, which is longer than the defined maximum line length in the code style.
452 if (mode == Mode.FEED && itemRecord != null) {
453 ItemRecordSynchronizationUtil.updateItemEngaged(itemRecord.serverId, true)
454 FeedItemAnalytics.reportClickCardAction(this@VideoViewHolder).apply {
455 if (groupViewPosition != null) customParam(FeedItemAnalyticsInfo.GROUP_POSITION, getItemPosition())
456 }
457 } else {
458 FeedItemAnalytics.reportClickCardAction(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/content/view/ContentTagView.kt:118:9Line detected, which is longer than the defined maximum line length in the code style.
115 })
116 binding.headerLayout.title.setText(R.string.real_age_tips)
117 binding.headerLayout.subtitle.setTextOrHide(source.title)
118 binding.headerLayout.root.setOnClickListener { NavigatorCoreUtil.ratNavigator.toRealAgeRecommendations(context, source.effect) }
119 }
120
121 private fun showBrandingTag(whiteLabel: WhiteLabel) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/extensions/BitmapExtensions.kt:29:1Line detected, which is longer than the defined maximum line length in the code style.
26 **/
27
28 @Utility(msg = "Extensions class for Bitmap", type = UtilityType.Extensions)
29 fun Bitmap.compressToSize(compressFormat: Bitmap.CompressFormat = Bitmap.CompressFormat.JPEG, size: Int): ByteArrayOutputStream {
30 val outputStream = ByteArrayOutputStream()
31 var quality = 90
32 compress(compressFormat, quality, outputStream)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/extensions/BitmapExtensions.kt:43:1Line detected, which is longer than the defined maximum line length in the code style.
40 return outputStream
41 }
42
43 fun Bitmap.toLimitedMultipartForm(fieldName: String, name: String, compressFormat: Bitmap.CompressFormat = Bitmap.CompressFormat.JPEG, size: Int): MultipartBody {
44 val stream = compressToSize(compressFormat, size)
45
46 val imageAsBytes: ByteArray = stream.toByteArray()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/extensions/BitmapExtensions.kt:56:1Line detected, which is longer than the defined maximum line length in the code style.
53 .build()
54 }
55
56 fun Bitmap.toMultipartForm(fieldName: String, name: String, compressFormat: Bitmap.CompressFormat = Bitmap.CompressFormat.JPEG, quality: Int = 90): MultipartBody =
57 toMultipartBodyBuilder(fieldName, name, compressFormat, quality).build()
58
59
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/extensions/BitmapExtensions.kt:60:1Line detected, which is longer than the defined maximum line length in the code style.
57 toMultipartBodyBuilder(fieldName, name, compressFormat, quality).build()
58
59
60 fun Bitmap.toMultipartBodyBuilder(fieldName: String, name: String, compressFormat: Bitmap.CompressFormat = Bitmap.CompressFormat.JPEG, quality: Int = 90): MultipartBody.Builder {
61 val stream = ByteArrayOutputStream()
62
63 compress(compressFormat, quality, stream)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/extensions/BitmapExtensions.kt:136:1Line detected, which is longer than the defined maximum line length in the code style.
133 return result
134 }
135
136 fun Bitmap.save(context: Context, path: String, format: Bitmap.CompressFormat = Bitmap.CompressFormat.JPEG, quality: Int = 100) {
137 val relativeFile = File(path)
138 .toPrivate(context)
139 .ensureParent()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/extensions/BitmapExtensions.kt:162:1Line detected, which is longer than the defined maximum line length in the code style.
159 }
160 }
161
162 fun Bitmap.saveAsync(context: Context, path: String, format: Bitmap.CompressFormat = Bitmap.CompressFormat.JPEG, quality: Int = 100): Completable {
163 return Completable.fromAction {
164 save(context, path, format, quality)
165 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/flows/GlobalFlowUtil.kt:16:2Line detected, which is longer than the defined maximum line length in the code style.
13 import org.koin.core.qualifier.named
14
15 /**
16 * Utility to simplify broadcasting global flow values from java classes (but it is okay to use it from kotlin classes as well).
17 * NOTICE: whenever a coroutine scope other than the application scope seems more appropriate for the broadcast: most probably a global broadcast is not the right solution.
18
19 * Please update the following document if this file is modified
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/flows/GlobalFlowUtil.kt:17:2Line detected, which is longer than the defined maximum line length in the code style.
14
15 /**
16 * Utility to simplify broadcasting global flow values from java classes (but it is okay to use it from kotlin classes as well).
17 * NOTICE: whenever a coroutine scope other than the application scope seems more appropriate for the broadcast: most probably a global broadcast is not the right solution.
18
19 * Please update the following document if this file is modified
20 * *bhttps://arnoldmedia.jira.com/wiki/spaces/SCB/pages/2994470924/Core+Components+documentation?focusedCommentId=3001483282#comment-3001483282
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/flows/GlobalFlowUtil.kt:20:2Line detected, which is longer than the defined maximum line length in the code style.
17 * NOTICE: whenever a coroutine scope other than the application scope seems more appropriate for the broadcast: most probably a global broadcast is not the right solution.
18
19 * Please update the following document if this file is modified
20 * *bhttps://arnoldmedia.jira.com/wiki/spaces/SCB/pages/2994470924/Core+Components+documentation?focusedCommentId=3001483282#comment-3001483282
21 */
22 @Utility(msg = "Utility to simplify broadcasting global flow values from java classes", type = UtilityType.Coroutine)
23 object GlobalFlowUtil : Logger by AndroidLogger(true, GlobalFlowUtil::class.simpleName!!) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/happypath/AppRater.kt:68:9Line detected, which is longer than the defined maximum line length in the code style.
65 val task = happyPathService.getHappyPaths()
66 .subscribeOn(Schedulers.io())
67 .observeOn(AndroidSchedulers.mainThread())
68 RxWrapperUtil.handleDisposable(task = task, onSuccess = { happyPaths = it.nextHappyActions }, onError = { L.e(it) })
69 }
70
71 /**
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/happypath/AppRater.kt:190:29Line detected, which is longer than the defined maximum line length in the code style.
187 it.getString(R.string.btn_nps_prompt_give_feedback_title),
188 it.getString(R.string.btn_nps_prompt_dismiss_title),
189 { dialog, _ ->
190 // Record a click - This sends data back to Qualtrics, indicating that the user opted to take the survey
191 result.recordClick()
192
193 val surveyIntent = Intent(activityRef.get(), QualtricsSurveyActivity::class.java)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/modal/ModalLayout.kt:25:9Line detected, which is longer than the defined maximum line length in the code style.
22 fun requireModalContainer(): FrameLayout
23
24 fun injectContent(v: View) {
25 requireModalContainer().addView(v, FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.MATCH_PARENT))
26 }
27 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/mvp2/BaseMvpFragmentExtensions.kt:50:1Line detected, which is longer than the defined maximum line length in the code style.
47 updateErrorLayout(errorContainer, layoutId, null)
48 }
49
50 private fun BaseMvpFragment<*, *>.updateErrorLayout(errorContainer: FrameLayout, layoutId: Int, listener: View.OnClickListener?) {
51 updateErrorLayout(errorContainer, layoutId, 0, null, null, null, listener)
52 }
53
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/mvp2/BaseMvpFragmentExtensions.kt:54:1Line detected, which is longer than the defined maximum line length in the code style.
51 updateErrorLayout(errorContainer, layoutId, 0, null, null, null, listener)
52 }
53
54 private fun BaseMvpFragment<*, *>.updateErrorLayout(errorContainer: FrameLayout, layoutId: Int, listener: View.OnClickListener?, title: String?, message: String?) {
55 updateErrorLayout(errorContainer, layoutId, 0, title, message, null, listener)
56 }
57
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/mvp2/RxMvp.kt:29:1Line detected, which is longer than the defined maximum line length in the code style.
26 fun hideErrorContainer()
27 }
28
29 class PermissionFollowUp(val permissions: PermissionsUtil.PermissionValue, val granted: () -> Unit, val denied: () -> Unit)
30
31 abstract class RxFragment<P : RxPresenter<V>, V : RxMvp> : BaseMvpFragment<P, V>(), RxMvp, NavigationSuppressor {
32
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/mvp2/RxMvp.kt:37:5Line detected, which is longer than the defined maximum line length in the code style.
34
35 private val permissionsFollowUp = mutableMapOf<Int, PermissionFollowUp?>()
36
37 fun withPermissions(permissions: PermissionsUtil.PermissionValue, permissionsRational: String, granted: () -> Unit) =
38 withPermissions(permissions, permissionsRational, granted, {})
39
40 fun withPermissions(permissions: PermissionsUtil.PermissionValue, permissionsRational: Int, granted: () -> Unit) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/mvp2/RxMvp.kt:45:5Line detected, which is longer than the defined maximum line length in the code style.
42 withPermissions(permissions, rational, granted, {})
43 }
44
45 fun withPermissions(permissions: PermissionsUtil.PermissionValue, permissionsRational: String, granted: () -> Unit, denied: () -> Unit) {
46 val permissionsStatus = PermissionsUtil.checkPermissions(this, permissions)
47
48 when (permissionsStatus) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/mvp2/RxMvp.kt:51:13Line detected, which is longer than the defined maximum line length in the code style.
48 when (permissionsStatus) {
49 PermissionsUtil.PermissionState.MAY_BE_ASKED -> askForPermissions(permissions, granted, denied)
50 PermissionsUtil.PermissionState.PREVIOUSLY_DENIED -> askForPermissions(permissions, granted, denied)
51 PermissionsUtil.PermissionState.PERMANENTLY_DISABLED -> redirectToSettingsIfAllowed(permissions, permissionsRational, granted, denied)
52 PermissionsUtil.PermissionState.GRANTED -> granted()
53 }
54 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/mvp2/RxMvp.kt:56:5Line detected, which is longer than the defined maximum line length in the code style.
53 }
54 }
55
56 fun withPermissions(permissions: PermissionsUtil.PermissionValue, permissionsRational: Int, granted: () -> Unit, denied: () -> Unit) {
57 withPermissions(
58 permissions,
59 getString(permissionsRational),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/mvp2/RxMvp.kt:88:5Line detected, which is longer than the defined maximum line length in the code style.
85 }
86 }
87
88 private fun redirectToSettingsIfAllowed(permissions: PermissionsUtil.PermissionValue, permissionsRational: String, granted: () -> Unit, denied: () -> Unit) {
89 val permissionCode = generateRandomPermissionCode()
90 registerPermissionsFollowUp(permissions, permissionCode, granted, denied)
91 displayPermissionsRational(permissionsRational, denied, permissionCode)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/mvp2/RxMvp.kt:127:5Line detected, which is longer than the defined maximum line length in the code style.
124 return intent
125 }
126
127 private fun askForPermissions(permissions: PermissionsUtil.PermissionValue, granted: () -> Unit, denied: () -> Unit) {
128 val permissionCode = generateRandomPermissionCode()
129 registerPermissionsFollowUp(permissions, permissionCode, granted, denied)
130 requestPermissions(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/mvp2/RxMvp.kt:136:5Line detected, which is longer than the defined maximum line length in the code style.
133 )
134 }
135
136 private fun registerPermissionsFollowUp(permissions: PermissionsUtil.PermissionValue, permissionCode: Int, granted: () -> Unit, denied: () -> Unit) {
137 permissionsFollowUp[permissionCode] = PermissionFollowUp(permissions, granted, denied)
138 }
139
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/navigation/BottomNavigationUtil.kt:15:1Line detected, which is longer than the defined maximum line length in the code style.
12 * Please update the following document if this file is modified
13 * https://arnoldmedia.jira.com/wiki/spaces/SCB/pages/2994470924/Core+Components+documentation?focusedCommentId=3001483282#comment-3001483282
14 */
15 @Utility(msg = "Utility class for displaying a badge over a specific item in BottomNavaigationView", type = UtilityType.Nav)
16 object BottomNavigationUtil {
17 fun setBadgeVisible(destination: RootDestination, navigationView: BottomNavigationView, visible: Boolean) {
18 val badgeView = navigationView.findViewById<View>(destination.id)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/navigation/DestinationInfo.kt:31:5Line detected, which is longer than the defined maximum line length in the code style.
28
29
30 fun LifecycleCoroutineScope.observeUpmostDestination(f:suspend(destinationInfo:DestinationInfo<*>)->Unit) = launch{
31 globalInjection().get<MutableStateFlow<DestinationInfo<*>?>>(named(GlobalFlowId.UpMostDestination)).filterNotNull().collect { f(it) }
32 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/navigation/NavigationController.kt:79:5Line detected, which is longer than the defined maximum line length in the code style.
76 }
77
78
79 @Reminder("This solution is no ideal: currently we manually loop the backstack to detect the upmost fragment. migration to navigation components will fix")
80 private fun FragmentManager.observeBackStackByLoop(periodMs: Long) {
81 activityRef.get()?.lifecycleScope?.launch {
82 var previous: Fragment? = null
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/navigation/NavigationController.kt:95:5Line detected, which is longer than the defined maximum line length in the code style.
92 }
93 }
94
95 // We are setting default value for the scenario when we open Webview from the ModalView which is a internal deeplink
96 private var currentTab: RootDestination = RootDestination.HOME
97
98 fun getSelectedTab() = currentTab
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/navigation/NavigationController.kt:119:5Line detected, which is longer than the defined maximum line length in the code style.
116 }
117
118 //This Method should be use in hosting activity to restore the controller state after activity was recreated,
119 // as we are creating new object of NavigationController and fragmentManager is keeping the last fragment which was visible,
120 // we need to set the current tab and push the currently visible fragment.
121 fun restoreState(selectedTab: RootDestination) {
122 currentTab = selectedTab
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/navigation/NavigationController.kt:182:9Line detected, which is longer than the defined maximum line length in the code style.
179 customAnimations: CustomAnimationContainer? = null
180 ) {
181 //TODO NAVIGATION CHANGE
182 //TODO: For now we are changing navigation only on Discovery tab to keep history for search. Will be changed later on
183 if (shouldAdd) stacks[tag]?.push(fragment)
184
185 fragmentManager.beginTransaction()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/navigation/NavigationController.kt:229:9Line detected, which is longer than the defined maximum line length in the code style.
226 }
227
228 @Review(
229 "If condition line 222 is a Quickfix for a crash happening when trying to pop the FabContainerFragment. A more concise solution needs to be found)",
230 Developer.Etienne
231 )
232 private fun popFragments(): Boolean {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/navigation/NavigationController.kt:265:13Line detected, which is longer than the defined maximum line length in the code style.
262 if (suppressor?.interceptNavigationAction(NavigationAction.Type.UP.asAction()) != true) {
263
264 val backStackEntryCount = stacks[currentTab]!!.size
265 //popFragments method required the back stack to have at least 2 fragments to be able to pop back successfully in
266 // other scenario method does nothing which can block user on the screen without option to close it,
267 // if we don't have previous screen we will try to recreate fragment stack based on the NavigationGraphImpl file
268 if (backStackEntryCount > 1) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/navigation/NavigationController.kt:267:13Line detected, which is longer than the defined maximum line length in the code style.
264 val backStackEntryCount = stacks[currentTab]!!.size
265 //popFragments method required the back stack to have at least 2 fragments to be able to pop back successfully in
266 // other scenario method does nothing which can block user on the screen without option to close it,
267 // if we don't have previous screen we will try to recreate fragment stack based on the NavigationGraphImpl file
268 if (backStackEntryCount > 1) {
269 // assume user arrived to the fragment by manual navigation
270 popFragments()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/navigation/NavigationController.kt:288:13Line detected, which is longer than the defined maximum line length in the code style.
285 */
286 fun popBack() {
287 if (stacks[currentTab]?.size == 1) {
288 // We are already showing first fragment of current tab, so when back pressed, we will finish this activity..
289 /* Goto previous fragment in navigation stack of this tab */
290
291 popFragments()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/navigation/NavigationController.kt:365:6Line detected, which is longer than the defined maximum line length in the code style.
362 }
363
364 /**
365 * @return true if action was consumed by current fragment, otherwise we can rely on standard mechanism of popping a fragment
366 */
367 fun onBackPressed(): Boolean {
368 val suppressor = getCurrentFragmentAsNavigationSuppressor()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/navigation/NavigationController.kt:526:2Line detected, which is longer than the defined maximum line length in the code style.
523 }
524
525 /**
526 * Handy extension function that allows easier getting of a [NavigationController] in Fragments that are written in Kotlin.
527 */
528 fun Fragment.getNavigationController() = (activity as NavigationProvider).getNavigationController()
529
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/navigation/NavigationGraph.kt:20:6Line detected, which is longer than the defined maximum line length in the code style.
17 fun getFragmentForRoot(destination: RootDestination): RootFragment
18
19 /**
20 * Returns a [RootDestination] object for selecting a proper section in the bottom navigation view when a screen is opened as a deeplink.
21 */
22 fun getRootDestinationOf(fragment: Fragment): RootDestination
23 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/phone/PhoneCodeSearchAdapter.kt:19:5Line detected, which is longer than the defined maximum line length in the code style.
16 }, val onItemSelect: (item: PhoneEncoding) -> Unit
17 ) : DiffAdapter<PhoneEncoding, DiffViewHolder<PhoneEncoding, *>>(diff = diff) {
18
19 override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): DiffViewHolder<PhoneEncoding, *> = ItemViewHolder(parent)
20
21 inner class ItemViewHolder(parent: ViewGroup) : DiffViewHolder<PhoneEncoding, ItemSearchCountryBinding>(
22 ItemSearchCountryBinding.inflate(LayoutInflater.from(parent.context), parent, false)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/phone/PhoneCodeSearchBinding.kt:16:1Line detected, which is longer than the defined maximum line length in the code style.
13 import com.sharecare.realgreen.tool.onEdit
14 import kotlin.reflect.KClass
15
16 fun FragmentPhoneCodeSearchBinding.bindPhoneCodeSearch(fragmentClass: KClass<out NavFragment<*>>, vm: PhoneEncodingViewModelComposite<*>, beh: BackEventHandler) = flowBind(vm.encodingStateFlow) {
17
18 onCreateScreen { api, _, _ ->
19 vm.onInputPhoneEncodingSearch("")
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/phone/PhoneCodeSelectionAdapter.kt:17:13Line detected, which is longer than the defined maximum line length in the code style.
14 private val selection: PhoneEncoding?,
15 diff: DiffUtil.ItemCallback<PhoneEncoding> = object : DiffUtil.ItemCallback<PhoneEncoding>() {
16 override fun areItemsTheSame(oldItem: PhoneEncoding, newItem: PhoneEncoding) = oldItem.id == newItem.id
17 override fun areContentsTheSame(oldItem: PhoneEncoding, newItem: PhoneEncoding): Boolean = oldItem.isSelected == newItem.isSelected
18 },
19 val onItemSelect: (item: PhoneEncoding) -> Unit,
20 ) : DiffAdapter<PhoneEncoding, DiffViewHolder<PhoneEncoding, *>>(diff = diff), StickyRecyclerHeadersAdapter<CountryHeaderViewHolder> {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/phone/PhoneCodeSelectionAdapter.kt:20:1Line detected, which is longer than the defined maximum line length in the code style.
17 override fun areContentsTheSame(oldItem: PhoneEncoding, newItem: PhoneEncoding): Boolean = oldItem.isSelected == newItem.isSelected
18 },
19 val onItemSelect: (item: PhoneEncoding) -> Unit,
20 ) : DiffAdapter<PhoneEncoding, DiffViewHolder<PhoneEncoding, *>>(diff = diff), StickyRecyclerHeadersAdapter<CountryHeaderViewHolder> {
21
22 private var items: List<PhoneEncoding>? = null
23
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/phone/PhoneCodeSelectionAdapter.kt:24:5Line detected, which is longer than the defined maximum line length in the code style.
21
22 private var items: List<PhoneEncoding>? = null
23
24 override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): DiffViewHolder<PhoneEncoding, *> = ItemViewHolder(parent)
25
26 override fun submitList(list: List<PhoneEncoding>?) {
27 items = list
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/phone/PhoneCodeSelectionAdapter.kt:33:5Line detected, which is longer than the defined maximum line length in the code style.
30
31 override fun getHeaderId(position: Int) = items?.get(position)?.letter()?.toLong() ?: 0L
32
33 override fun onCreateHeaderViewHolder(parent: ViewGroup): CountryHeaderViewHolder = CountryHeaderViewHolder.create(parent)
34
35 override fun onBindHeaderViewHolder(vh: CountryHeaderViewHolder, position: Int) {
36 items?.get(position)?.let { vh.setAsLetter(it.letter().toString().capitalize(Locale.getDefault())) }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/phone/PhoneCodeSelectionBinding.kt:15:1Line detected, which is longer than the defined maximum line length in the code style.
12 import com.timehop.stickyheadersrecyclerview.StickyRecyclerHeadersDecoration
13 import kotlin.reflect.KClass
14
15 fun FragmentPhoneCodeSelectBinding.bindPhoneCodeSelect(fragmentClass: KClass<out NavFragment<*>>, vm: PhoneEncodingViewModelComposite<*>, beh: BackEventHandler) = flowBind(vm.encodingStateFlow) {
16
17 onCreateScreen { _, _, state ->
18 val index = state.phoneEncodingPool.indexOfFirst { it.id == state.phoneEncodingSelection?.id }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/phone/PhoneCollectionHelpers.kt:7:5Line detected, which is longer than the defined maximum line length in the code style.
4
5 class PhoneCollectionHelpers {
6
7 fun validatePhoneNumber(number: String?, countryId: String?): Pair<String, Boolean> = with(PhoneNumberUtil.getInstance()) {
8 try {
9 if (number.isNullOrEmpty()) throw PhoneNumberError.BlankNumber
10 with(parse(number, countryId)) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/phone/PhoneCollectionHelpers.kt:11:17Line detected, which is longer than the defined maximum line length in the code style.
8 try {
9 if (number.isNullOrEmpty()) throw PhoneNumberError.BlankNumber
10 with(parse(number, countryId)) {
11 val result: String = if (isValidNumber(this)) format(this, PhoneNumberUtil.PhoneNumberFormat.E164) else throw PhoneNumberError.InvalidNumber
12 return result to (PhoneNumberUtil.getInstance().getNumberType(this) == PhoneNumberUtil.PhoneNumberType.MOBILE)
13 }
14 } catch (e: Exception) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/phone/PhoneCollectionHelpers.kt:12:17Line detected, which is longer than the defined maximum line length in the code style.
9 if (number.isNullOrEmpty()) throw PhoneNumberError.BlankNumber
10 with(parse(number, countryId)) {
11 val result: String = if (isValidNumber(this)) format(this, PhoneNumberUtil.PhoneNumberFormat.E164) else throw PhoneNumberError.InvalidNumber
12 return result to (PhoneNumberUtil.getInstance().getNumberType(this) == PhoneNumberUtil.PhoneNumberType.MOBILE)
13 }
14 } catch (e: Exception) {
15 if (e is PhoneNumberError) throw e else throw PhoneNumberError.MalformedNumber
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/phone/PhoneCollectionHelpers.kt:32:13Line detected, which is longer than the defined maximum line length in the code style.
29 val phoneNumber = parse(number, "ZZ")
30 if (phoneNumber.hasCountryCode()) return phoneNumber.countryCode
31 }
32 if (number.length == 3 && number.startsWith("+")) whenSafe { number.removePrefix("+").toInt() } just { return it }
33 safe { return parse(number, "ZZ").countryCode }
34 return null
35 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/phone/PhoneCollectionHelpers.kt:39:1Line detected, which is longer than the defined maximum line length in the code style.
36 }
37 }
38
39 fun advocacyPhoneValidation(number: String?, countryId: String?, fallbackCountryId: String = "US"): Pair<String, Boolean> {
40 fun String.cleanFormat(): String = this.filter { char: Char -> !char.isWhitespace() && char != "-".first() && char != ")".first() && char != "(".first() }
41 val lib = PhoneNumberUtil.getInstance()
42 if (number.isNullOrBlank()) throw IllegalStateException("Advocacy validation failed", PhoneNumberError.BlankNumber)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/phone/PhoneCollectionHelpers.kt:40:5Line detected, which is longer than the defined maximum line length in the code style.
37 }
38
39 fun advocacyPhoneValidation(number: String?, countryId: String?, fallbackCountryId: String = "US"): Pair<String, Boolean> {
40 fun String.cleanFormat(): String = this.filter { char: Char -> !char.isWhitespace() && char != "-".first() && char != ")".first() && char != "(".first() }
41 val lib = PhoneNumberUtil.getInstance()
42 if (number.isNullOrBlank()) throw IllegalStateException("Advocacy validation failed", PhoneNumberError.BlankNumber)
43 return try {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/phone/PhoneCollectionHelpers.kt:45:9Line detected, which is longer than the defined maximum line length in the code style.
42 if (number.isNullOrBlank()) throw IllegalStateException("Advocacy validation failed", PhoneNumberError.BlankNumber)
43 return try {
44 val parse = lib.parse(number, countryId)
45 if (!lib.isValidNumber(parse)) throw IllegalStateException("Parse failed (with country id provided)", PhoneNumberError.InvalidNumber)
46 val formatted = lib.format(parse, PhoneNumberUtil.PhoneNumberFormat.E164).cleanFormat()
47 formatted to (lib.getNumberType(parse) == PhoneNumberUtil.PhoneNumberType.MOBILE)
48 } catch (e: java.lang.Exception) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/phone/PhoneCollectionHelpers.kt:51:13Line detected, which is longer than the defined maximum line length in the code style.
48 } catch (e: java.lang.Exception) {
49 try {
50 val parse = lib.parse(number, null)
51 if (!lib.isValidNumber(parse)) throw IllegalStateException("Parse failed (without country id)", PhoneNumberError.InvalidNumber)
52 val formatted = lib.format(parse, PhoneNumberUtil.PhoneNumberFormat.E164).cleanFormat()
53 formatted to (lib.getNumberType(parse) == PhoneNumberUtil.PhoneNumberType.MOBILE)
54 } catch (e: java.lang.Exception) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/phone/PhoneCollectionHelpers.kt:57:17Line detected, which is longer than the defined maximum line length in the code style.
54 } catch (e: java.lang.Exception) {
55 try {
56 val parse = lib.parse(number, fallbackCountryId)
57 if (!lib.isValidNumber(parse)) throw IllegalStateException("Parse failed (with fallback country id)", PhoneNumberError.InvalidNumber)
58 val formatted = lib.format(parse, PhoneNumberUtil.PhoneNumberFormat.E164).cleanFormat()
59 formatted to (lib.getNumberType(parse) == PhoneNumberUtil.PhoneNumberType.MOBILE)
60 } catch (e: IllegalStateException) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/phone/PhoneEncodingViewModelCompositeImpl.kt:42:17Line detected, which is longer than the defined maximum line length in the code style.
39 override fun onInputPhoneNumber(numberInput: String?) {
40 if (state.phoneEncodingNumberInput != numberInput) {
41 if (!state.phoneEncodingClearNumber) {
42 state = state.copy(phoneEncodingInputError = null, phoneEncodingApiError = null, phoneEncodingNumberInput = numberInput)
43 } else {
44 if (numberInput.isNullOrBlank()) {
45 state = state.copy(phoneEncodingClearNumber = false)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/phone/PhoneEncodingViewModelCompositeImpl.kt:53:13Line detected, which is longer than the defined maximum line length in the code style.
50
51 override fun onInputPhoneEncodingSearch(searchInput: String) {
52 compositeScope.launch {
53 state = state.copy(phoneEncodingSearchInput = searchInput, phoneEncodingRange = state.phoneEncodingPool.filter(searchInput))
54 }
55 }
56
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/phone/PhoneEncodingViewModelCompositeImpl.kt:63:29Line detected, which is longer than the defined maximum line length in the code style.
60 state = state.copy(
61 navigation = when (source) {
62 FragmentPhoneCodeSelectBinding::class -> NavigationConstants.UP.asNavigationItem()
63 FragmentPhoneCodeSearchBinding::class -> PhoneEncodingCollectionView::class.asNavigationItem()
64 else -> null
65 },
66 phoneEncodingInputError = null,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/phone/PhoneEncodingViewModelCompositeImpl.kt:76:29Line detected, which is longer than the defined maximum line length in the code style.
73 state = state.copy(
74 navigation = when (source) {
75 FragmentPhoneCodeSelectBinding::class -> NavigationConstants.UP.asNavigationItem()
76 FragmentPhoneCodeSearchBinding::class -> PhoneEncodingCollectionView::class.asNavigationItem()
77 else -> null
78 }
79 )
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/phone/PhoneEncodingViewModelCompositeImpl.kt:86:9Line detected, which is longer than the defined maximum line length in the code style.
83 }
84
85 override fun onPressEncodingInputField() {
86 state = state.copy(navigation = PhoneEncodingSelectionView::class.asNavigationItem(), phoneEncodingInputError = null, phoneEncodingApiError = null)
87 }
88
89 override fun onPressEncodingSearch() {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/phone/PhoneEncodingViewModelCompositeImpl.kt:100:5Line detected, which is longer than the defined maximum line length in the code style.
97 return accountRepository.fetchCountriesAsync().await()
98 }
99
100 override fun List<CountryItem>.getSupportedEncodings() = supportedMapping(PhoneNumberUtil.getInstance().supportedRegions())
101
102 private var phoneLogic: Job? = null
103
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/phone/PhoneEncodingViewModelCompositeImpl.kt:123:21Line detected, which is longer than the defined maximum line length in the code style.
120 ).compute()) {
121 previousEncoding = encodingResult()
122 previousNumber = numberResult()
123 if (state.phoneEncodingNumberInput != numberResult() || state.phoneEncodingSelection != encodingResult()) {
124 this@PhoneEncodingViewModelCompositeImpl.state = this@PhoneEncodingViewModelCompositeImpl.state.copy(phoneEncodingSelection = encodingResult(), phoneEncodingNumberInput = numberResult())
125 }
126 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/phone/PhoneEncodingViewModelCompositeImpl.kt:124:25Line detected, which is longer than the defined maximum line length in the code style.
121 previousEncoding = encodingResult()
122 previousNumber = numberResult()
123 if (state.phoneEncodingNumberInput != numberResult() || state.phoneEncodingSelection != encodingResult()) {
124 this@PhoneEncodingViewModelCompositeImpl.state = this@PhoneEncodingViewModelCompositeImpl.state.copy(phoneEncodingSelection = encodingResult(), phoneEncodingNumberInput = numberResult())
125 }
126 }
127 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/phone/PhoneEncodingViewModelCompositeImpl.kt:133:13Line detected, which is longer than the defined maximum line length in the code style.
130
131 override suspend fun initEncodingRange(initPhoneNumber: String?, defaultCountry: String?) {
132 try {
133 i("Initializing the phone encoding range (initial PhoneNumber: $initPhoneNumber ; defaultCountry: $defaultCountry)")
134 state = state.copy(phoneEncodingInputError = null, phoneEncodingApiError = null, phase = ScreenPhase.Loading)
135 val ssoCountries = fetchCountries()
136 val supportedEncodings = ssoCountries.getSupportedEncodings()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/phone/PhoneEncodingViewModelCompositeImpl.kt:134:13Line detected, which is longer than the defined maximum line length in the code style.
131 override suspend fun initEncodingRange(initPhoneNumber: String?, defaultCountry: String?) {
132 try {
133 i("Initializing the phone encoding range (initial PhoneNumber: $initPhoneNumber ; defaultCountry: $defaultCountry)")
134 state = state.copy(phoneEncodingInputError = null, phoneEncodingApiError = null, phase = ScreenPhase.Loading)
135 val ssoCountries = fetchCountries()
136 val supportedEncodings = ssoCountries.getSupportedEncodings()
137 if (!supportedEncodings.isNullOrEmpty()) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/phone/PhoneNumberApiHelpers.kt:9:1Line detected, which is longer than the defined maximum line length in the code style.
6
7 fun PhoneNumberError.toInputErrorString() = appContext().getString(strResId)
8
9 fun PhoneNumberUtil.supportedRegions(): List<Pair<String, Int>> = supportedRegions.map { regionCode -> regionCode to getCountryCodeForRegion(regionCode) }
10 fun PhoneNumberUtil.allRegions() = supportedRegions().map {
11 PhoneEncoding(
12 id = "${it.second}_${it.second}",
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/phone/PhoneNumberApiHelpers.kt:32:1Line detected, which is longer than the defined maximum line length in the code style.
29 } else null
30 }
31
32 fun List<PhoneEncoding>?.filter(searchInput: String): List<PhoneEncoding> = if (this == null || searchInput.isBlank()) this
33 ?: listOf() else filterBy(searchInput)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/phone/PhoneNumberError.kt:7:5Line detected, which is longer than the defined maximum line length in the code style.
4
5
6 sealed class PhoneNumberError(val strResId: Int, msg: String?) : Exception(msg) {
7 object BlankNumber : PhoneNumberError(R.string.onboarding_mfa_add_phone_error_empty_number, BlankNumber::class.simpleName)
8 object MalformedNumber : PhoneNumberError(R.string.onboarding_mfa_add_phone_error_invalid, MalformedNumber::class.simpleName)
9 object InvalidNumber : PhoneNumberError(R.string.onboarding_mfa_add_phone_error_invalid, InvalidNumber::class.simpleName)
10 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/phone/PhoneNumberError.kt:8:5Line detected, which is longer than the defined maximum line length in the code style.
5
6 sealed class PhoneNumberError(val strResId: Int, msg: String?) : Exception(msg) {
7 object BlankNumber : PhoneNumberError(R.string.onboarding_mfa_add_phone_error_empty_number, BlankNumber::class.simpleName)
8 object MalformedNumber : PhoneNumberError(R.string.onboarding_mfa_add_phone_error_invalid, MalformedNumber::class.simpleName)
9 object InvalidNumber : PhoneNumberError(R.string.onboarding_mfa_add_phone_error_invalid, InvalidNumber::class.simpleName)
10 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/phone/PhoneNumberError.kt:9:5Line detected, which is longer than the defined maximum line length in the code style.
6 sealed class PhoneNumberError(val strResId: Int, msg: String?) : Exception(msg) {
7 object BlankNumber : PhoneNumberError(R.string.onboarding_mfa_add_phone_error_empty_number, BlankNumber::class.simpleName)
8 object MalformedNumber : PhoneNumberError(R.string.onboarding_mfa_add_phone_error_invalid, MalformedNumber::class.simpleName)
9 object InvalidNumber : PhoneNumberError(R.string.onboarding_mfa_add_phone_error_invalid, InvalidNumber::class.simpleName)
10 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/presenter/phr/PHRSectionPresenter.kt:7:1Line detected, which is longer than the defined maximum line length in the code style.
4 import com.sharecare.realgreen.core.type.healthprofile.HealthCategory
5
6
7 abstract class PHRSectionPresenter<IView : IPHRSectionView>(val dependentId: String? = null) : PHRBasePresenter<IView>() {
8
9 protected lateinit var sectionCategory: HealthCategory
10
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/AccountRepository.kt:15:5Line detected, which is longer than the defined maximum line length in the code style.
12 interface AccountRepository {
13
14 @OptIn(ExperimentalCoroutinesApi::class)
15 suspend fun fetchProfile(onResult: suspend (account: Account, markets: List<MarketItem>, countries: List<CountryItem>, address: UserAddressData) -> Unit) {
16 val email = fetchEmailAsync().await()
17 awaitAll(fetchAccountAsync(), fetchMarketsAsync(email), fetchCountriesAsync(), fetchAddressAsync())
18 //this line is only reached once await all completes
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/UserSettingsRepository.kt:85:34Line detected, which is longer than the defined maximum line length in the code style.
82 }
83
84 class UserSettingsRepositoryImpl(private val userSettingsService: UserSettingsService,
85 private val sharedPreferencesRepository: OrigamiSharedPreferencesRepository) : UserSettingsRepository {
86
87 override fun setStepsInfoTipDismissed() {
88 sharedPreferencesRepository.setStepsInfoTipToShow(false)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/UserSettingsRepository.kt:159:17Line detected, which is longer than the defined maximum line length in the code style.
156
157 override fun fetchSettings() =
158 getRemoteSettings { it ->
159 (it[KEY_AUTOMATIC_TRACKING_INFO_TO_SHOW] as? Boolean)?.let { sharedPreferencesRepository.setStepsInfoTipToShow(it) }
160 (it[KEY_GUIDED_TOOLTIP_TO_SHOW] as? Boolean)?.let { sharedPreferencesRepository.setDashboardMainToolTipsToShow(it) }
161 (it[KEY_AUTOMATIC_TRACKING_DASHBOARD_WIZARD_TO_SHOW] as? Boolean)?.let { sharedPreferencesRepository.setTrackerWizardOnDashboardToShow(it) }
162 (it[KEY_AUTOMATIC_TRACKING_ADD_ENTRY_WIZARD_TO_SHOW] as? Boolean)?.let { sharedPreferencesRepository.setTrackerWizardOnAddEntryToShow(it) }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/UserSettingsRepository.kt:160:17Line detected, which is longer than the defined maximum line length in the code style.
157 override fun fetchSettings() =
158 getRemoteSettings { it ->
159 (it[KEY_AUTOMATIC_TRACKING_INFO_TO_SHOW] as? Boolean)?.let { sharedPreferencesRepository.setStepsInfoTipToShow(it) }
160 (it[KEY_GUIDED_TOOLTIP_TO_SHOW] as? Boolean)?.let { sharedPreferencesRepository.setDashboardMainToolTipsToShow(it) }
161 (it[KEY_AUTOMATIC_TRACKING_DASHBOARD_WIZARD_TO_SHOW] as? Boolean)?.let { sharedPreferencesRepository.setTrackerWizardOnDashboardToShow(it) }
162 (it[KEY_AUTOMATIC_TRACKING_ADD_ENTRY_WIZARD_TO_SHOW] as? Boolean)?.let { sharedPreferencesRepository.setTrackerWizardOnAddEntryToShow(it) }
163 (it[KEY_GUIDED_REMINDERS_TOOLTIP_TO_SHOW] as? Boolean)?.let { sharedPreferencesRepository.setDashboardRemindersToolTipsToShow(it) }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/UserSettingsRepository.kt:161:17Line detected, which is longer than the defined maximum line length in the code style.
158 getRemoteSettings { it ->
159 (it[KEY_AUTOMATIC_TRACKING_INFO_TO_SHOW] as? Boolean)?.let { sharedPreferencesRepository.setStepsInfoTipToShow(it) }
160 (it[KEY_GUIDED_TOOLTIP_TO_SHOW] as? Boolean)?.let { sharedPreferencesRepository.setDashboardMainToolTipsToShow(it) }
161 (it[KEY_AUTOMATIC_TRACKING_DASHBOARD_WIZARD_TO_SHOW] as? Boolean)?.let { sharedPreferencesRepository.setTrackerWizardOnDashboardToShow(it) }
162 (it[KEY_AUTOMATIC_TRACKING_ADD_ENTRY_WIZARD_TO_SHOW] as? Boolean)?.let { sharedPreferencesRepository.setTrackerWizardOnAddEntryToShow(it) }
163 (it[KEY_GUIDED_REMINDERS_TOOLTIP_TO_SHOW] as? Boolean)?.let { sharedPreferencesRepository.setDashboardRemindersToolTipsToShow(it) }
164 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/UserSettingsRepository.kt:162:17Line detected, which is longer than the defined maximum line length in the code style.
159 (it[KEY_AUTOMATIC_TRACKING_INFO_TO_SHOW] as? Boolean)?.let { sharedPreferencesRepository.setStepsInfoTipToShow(it) }
160 (it[KEY_GUIDED_TOOLTIP_TO_SHOW] as? Boolean)?.let { sharedPreferencesRepository.setDashboardMainToolTipsToShow(it) }
161 (it[KEY_AUTOMATIC_TRACKING_DASHBOARD_WIZARD_TO_SHOW] as? Boolean)?.let { sharedPreferencesRepository.setTrackerWizardOnDashboardToShow(it) }
162 (it[KEY_AUTOMATIC_TRACKING_ADD_ENTRY_WIZARD_TO_SHOW] as? Boolean)?.let { sharedPreferencesRepository.setTrackerWizardOnAddEntryToShow(it) }
163 (it[KEY_GUIDED_REMINDERS_TOOLTIP_TO_SHOW] as? Boolean)?.let { sharedPreferencesRepository.setDashboardRemindersToolTipsToShow(it) }
164 }
165
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/UserSettingsRepository.kt:163:17Line detected, which is longer than the defined maximum line length in the code style.
160 (it[KEY_GUIDED_TOOLTIP_TO_SHOW] as? Boolean)?.let { sharedPreferencesRepository.setDashboardMainToolTipsToShow(it) }
161 (it[KEY_AUTOMATIC_TRACKING_DASHBOARD_WIZARD_TO_SHOW] as? Boolean)?.let { sharedPreferencesRepository.setTrackerWizardOnDashboardToShow(it) }
162 (it[KEY_AUTOMATIC_TRACKING_ADD_ENTRY_WIZARD_TO_SHOW] as? Boolean)?.let { sharedPreferencesRepository.setTrackerWizardOnAddEntryToShow(it) }
163 (it[KEY_GUIDED_REMINDERS_TOOLTIP_TO_SHOW] as? Boolean)?.let { sharedPreferencesRepository.setDashboardRemindersToolTipsToShow(it) }
164 }
165
166
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/UserSettingsRepository.kt:270:9Line detected, which is longer than the defined maximum line length in the code style.
267
268 companion object {
269 @JvmStatic
270 fun provideToExternalModule(sharedPreferences: SharedPreferences): UserSettingsRepository = UserSettingsRepositoryImpl(
271 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.USER_SETTINGS) as UserSettingsService,
272 OrigamiSharedPreferencesRepositoryImpl(sharedPreferences)
273 )
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/UserSettingsRepository.kt:271:17Line detected, which is longer than the defined maximum line length in the code style.
268 companion object {
269 @JvmStatic
270 fun provideToExternalModule(sharedPreferences: SharedPreferences): UserSettingsRepository = UserSettingsRepositoryImpl(
271 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.USER_SETTINGS) as UserSettingsService,
272 OrigamiSharedPreferencesRepositoryImpl(sharedPreferences)
273 )
274
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/UserSettingsRepository.kt:278:9Line detected, which is longer than the defined maximum line length in the code style.
275 private const val KEY_AUTOMATIC_TRACKING_INFO_TO_SHOW = "automaticTrackingInfo"
276 private const val KEY_GUIDED_TOOLTIP_TO_SHOW = "showTrackerDashboardGuidedTooltip-Android"
277 private const val KEY_GUIDED_REMINDERS_TOOLTIP_TO_SHOW = "showTrackerDashboardGuidedRemindersTooltip-Android"
278 private const val KEY_AUTOMATIC_TRACKING_DASHBOARD_WIZARD_TO_SHOW = "showAutomaticTrackerDashboardWizard-Android"
279 private const val KEY_AUTOMATIC_TRACKING_ADD_ENTRY_WIZARD_TO_SHOW = "showAutomaticTrackerSubmissionWizard-Android"
280 }
281 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/UserSettingsRepository.kt:279:9Line detected, which is longer than the defined maximum line length in the code style.
276 private const val KEY_GUIDED_TOOLTIP_TO_SHOW = "showTrackerDashboardGuidedTooltip-Android"
277 private const val KEY_GUIDED_REMINDERS_TOOLTIP_TO_SHOW = "showTrackerDashboardGuidedRemindersTooltip-Android"
278 private const val KEY_AUTOMATIC_TRACKING_DASHBOARD_WIZARD_TO_SHOW = "showAutomaticTrackerDashboardWizard-Android"
279 private const val KEY_AUTOMATIC_TRACKING_ADD_ENTRY_WIZARD_TO_SHOW = "showAutomaticTrackerSubmissionWizard-Android"
280 }
281 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/phr/healthprofile/DetailedHealthProfileDataRepository.kt:62:5Line detected, which is longer than the defined maximum line length in the code style.
59 }
60 }
61
62 override fun getHealthRecords(healthRecordType: HealthRecordType, dependentId: String?) = RxWrapperUtil.create<List<HealthRecord>> {
63 Realm.getDefaultInstance().use { realm ->
64 realm.copyFromRealm(realm.where(HealthRecord::class.java)
65 .equalTo(HealthRecord.ITEM_TYPE, healthRecordType.type).findAll())
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/phr/healthprofile/DetailedPHREditDataRepository.kt:30:5Line detected, which is longer than the defined maximum line length in the code style.
27 .createService(ServiceFactory.ServiceType.CLINICAL_INFORMATION_SHARECARE) as ClinicalInformationService
28 }
29
30 override fun deleteBiometricEntryRemotely(deleteModel: DeleteModel, id: String, dependentId: String?): Single<Error> {
31 return service.deleteBiometric(id, deleteModel, dependentId)
32 }
33
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/phr/healthprofile/DetailedPHREditDataRepository.kt:34:5Line detected, which is longer than the defined maximum line length in the code style.
31 return service.deleteBiometric(id, deleteModel, dependentId)
32 }
33
34 override fun deleteConditionsEntryRemotely(deleteModel: DeleteModel, id: String, dependentId: String?): Single<Error> {
35 return service.deleteCondition(id, deleteModel, dependentId)
36 }
37
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/phr/healthprofile/DetailedPHREditDataRepository.kt:38:5Line detected, which is longer than the defined maximum line length in the code style.
35 return service.deleteCondition(id, deleteModel, dependentId)
36 }
37
38 override fun deleteImmunizationsEntryRemotely(deleteModel: DeleteModel, id: String, dependentId: String?): Single<Error> {
39 return service.deleteImmunization(id, deleteModel, dependentId)
40 }
41
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/phr/healthprofile/DetailedPHREditDataRepository.kt:42:5Line detected, which is longer than the defined maximum line length in the code style.
39 return service.deleteImmunization(id, deleteModel, dependentId)
40 }
41
42 override fun deleteMedicationsEntryRemotely(deleteModel: DeleteModel, id: String, dependentId: String?): Single<Error> {
43 return service.deleteMedication(id, deleteModel, dependentId)
44 }
45
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/phr/healthprofile/DetailedPHREditDataRepository.kt:46:5Line detected, which is longer than the defined maximum line length in the code style.
43 return service.deleteMedication(id, deleteModel, dependentId)
44 }
45
46 override fun deleteProceduresEntryRemotely(deleteModel: DeleteModel, id: String, dependentId: String?): Single<Error> {
47 return service.deleteProcedure(id, deleteModel, dependentId)
48 }
49
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/phr/healthprofile/DetailedPHREditDataRepository.kt:50:5Line detected, which is longer than the defined maximum line length in the code style.
47 return service.deleteProcedure(id, deleteModel, dependentId)
48 }
49
50 override fun deleteLabTestsEntryRemotely(deleteModel: DeleteModel, id: String, dependentId: String?): Single<Error> {
51 return service.deleteLabTests(id, deleteModel, dependentId)
52 }
53
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/phr/healthprofile/DetailedPHREditDataRepository.kt:110:5Line detected, which is longer than the defined maximum line length in the code style.
107 }
108 }!!
109
110 override fun getHealthRecordsHistoryByCategory(healthRecordType: HealthRecordType) = RxWrapperUtil.create<List<HealthRecordHistory>> {
111 Realm.getDefaultInstance().use { realm ->
112 realm.copyFromRealm(realm.where(HealthRecordHistory::class.java)
113 .equalTo(HealthRecordHistory.ITEM_TYPE, healthRecordType.type).findAll())
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/phr/healthprofile/DetailedPHREditDataRepository.kt:125:17Line detected, which is longer than the defined maximum line length in the code style.
122
123 override fun getProviderPhysicians(providerMatching: ProviderMatching): Single<ProviderResponse> {
124 val providerService = ServiceFactory.getInstance()
125 .createService(ServiceFactory.ServiceType.PROVIDER_SHARECARE) as com.sharecare.phr.services.ProviderService
126 return providerService.getProviderPhysicians(providerMatching)
127 }
128
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/phr/healthprofile/DetailedPHREditDataRepository.kt:131:17Line detected, which is longer than the defined maximum line length in the code style.
128
129 override fun getProviderPhysicians(npis: String): Single<List<HgPhysician>> {
130 val providerService = ServiceFactory.getInstance()
131 .createService(ServiceFactory.ServiceType.PROVIDER_SHARECARE) as com.sharecare.phr.services.ProviderService
132 return providerService.getProviderPhysicians(npis)
133 }
134
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/phr/healthprofile/DetailedPHREditDataRepository.kt:138:13Line detected, which is longer than the defined maximum line length in the code style.
135 override fun deleteHealthRecords(code: String) {
136 RealmTransaction.execute { realm ->
137 Realm.getDefaultInstance()
138 val result = realm.where(HealthRecordHistory::class.java).equalTo(HealthRecordHistory.SERVER_ID, code).findAll()
139 result.deleteAllFromRealm()
140 }
141 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/phr/healthprofile/DetailedPHREditDataRepository.kt:151:41Line detected, which is longer than the defined maximum line length in the code style.
148 service.getHpBiometrics(code, codeSystem, codeSystemName, start, limit, sortOrder, sourceType, dependentId)
149
150 override fun getHpBiometricsHistory(code: String, codeSystem: String?, codeSystemName: String?,
151 page: Int, limit: Int, sortOrder: String, sourceType: String?, dependentId: String?) =
152 service.getHpBiometricsHistory(code, codeSystem, codeSystemName, page, limit, sortOrder, sourceType, dependentId)
153
154 override fun addHpBiometrics(biometricsRecords: List<HPBiometricResult>, dependentId: String?) =
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/phr/healthprofile/DetailedPHREditDataRepository.kt:152:13Line detected, which is longer than the defined maximum line length in the code style.
149
150 override fun getHpBiometricsHistory(code: String, codeSystem: String?, codeSystemName: String?,
151 page: Int, limit: Int, sortOrder: String, sourceType: String?, dependentId: String?) =
152 service.getHpBiometricsHistory(code, codeSystem, codeSystemName, page, limit, sortOrder, sourceType, dependentId)
153
154 override fun addHpBiometrics(biometricsRecords: List<HPBiometricResult>, dependentId: String?) =
155 service.addHpBiometrics(biometricsRecords, dependentId)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/phr/healthprofile/DetailedPHREditDataRepository.kt:157:5Line detected, which is longer than the defined maximum line length in the code style.
154 override fun addHpBiometrics(biometricsRecords: List<HPBiometricResult>, dependentId: String?) =
155 service.addHpBiometrics(biometricsRecords, dependentId)
156
157 override fun delHpRecord(category: HealthCategory, id: String?, code: String?, codeSystem: String?, deleteSource: HPDeleteModel, dependentId: String?) =
158 service.delHpRecord(category.hpApiPath(), id, code, codeSystem, deleteSource, dependentId)
159
160 override fun addHpCipRecords(category: HealthCategory, cipDetails: List<HPCipResult>, dependentId: String?) =
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/phr/healthprofile/DetailedPHREditDataRepository.kt:166:5Line detected, which is longer than the defined maximum line length in the code style.
163 override fun modHpCipRecord(category: HealthCategory, id: String, cipDetail: HPCipResult, dependentId: String?) =
164 service.modHpCipRecord(category.hpApiPath(), id, cipDetail, dependentId)
165
166 override fun modHpLabTestRecord(category: HealthCategory, id: String, labTestsDetail: HPLabTestsResult, dependentId: String?) =
167 service.modHpLabTestRecord(category.hpApiPath(), id, labTestsDetail, dependentId)
168
169 override fun addHpMedications(medicationsDetails: List<HPMedicationResult>, dependentId: String?) =
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/phr/healthprofile/DetailedPHREditDataRepository.kt:215:5Line detected, which is longer than the defined maximum line length in the code style.
212 override fun getCiCipSuggestions(category: HealthCategory, input: String, start: Int, limit: Int) =
213 clinicalInformationService.getCiCipSuggestions(category.ciApiPath(), input, start, limit)
214
215 override fun getHpCipRecords(category: HealthCategory, start: Int, limit: Int, sortOrder: String, dependentId: String?) =
216 service.getHpCipRecords(category.hpApiPath(), start, limit, sortOrder, dependentId)
217
218 override fun getHpCipHistoryRecords(category: HealthCategory, code: String, codeSystem: String?, codeSystemName: String?,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/phr/healthprofile/DetailedPHREditDataRepository.kt:218:5Line detected, which is longer than the defined maximum line length in the code style.
215 override fun getHpCipRecords(category: HealthCategory, start: Int, limit: Int, sortOrder: String, dependentId: String?) =
216 service.getHpCipRecords(category.hpApiPath(), start, limit, sortOrder, dependentId)
217
218 override fun getHpCipHistoryRecords(category: HealthCategory, code: String, codeSystem: String?, codeSystemName: String?,
219 start: Int, limit: Int, sortOrder: String, dependentId: String?) =
220 service.getHpCipHistoryRecords(category.hpApiPath(), code, codeSystem, codeSystemName, start, limit, sortOrder, dependentId)
221
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/phr/healthprofile/DetailedPHREditDataRepository.kt:220:13Line detected, which is longer than the defined maximum line length in the code style.
217
218 override fun getHpCipHistoryRecords(category: HealthCategory, code: String, codeSystem: String?, codeSystemName: String?,
219 start: Int, limit: Int, sortOrder: String, dependentId: String?) =
220 service.getHpCipHistoryRecords(category.hpApiPath(), code, codeSystem, codeSystemName, start, limit, sortOrder, dependentId)
221
222 override fun getCiBiometricsCategories(gender: String?) =
223 clinicalInformationService.getCiBiometricsCategories(gender)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/phr/healthprofile/DetailedPHREditRepository.kt:37:5Line detected, which is longer than the defined maximum line length in the code style.
34
35 fun deleteConditionsEntryRemotely(deleteModel: DeleteModel, id: String, dependentId: String? = null): Single<Error>
36
37 fun deleteImmunizationsEntryRemotely(deleteModel: DeleteModel, id: String, dependentId: String? = null): Single<Error>
38
39 fun deleteMedicationsEntryRemotely(deleteModel: DeleteModel, id: String, dependentId: String? = null): Single<Error>
40
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/phr/healthprofile/DetailedPHREditRepository.kt:77:5Line detected, which is longer than the defined maximum line length in the code style.
74
75 fun deleteHealthRecords(code: String)
76
77 fun getHpMedications(start: Int, limit: Int, sortOrder: String, dependentId: String? = null): Single<List<HPMedicationResult>>
78
79 fun getHpBiometrics(code: String?, codeSystem: String?, codeSystemName: String?, start: Int,
80 limit: Int, sortOrder: String, sourceType: String?, dependentId: String? = null): Single<List<HPBiometricResult>>
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/phr/healthprofile/DetailedPHREditRepository.kt:80:25Line detected, which is longer than the defined maximum line length in the code style.
77 fun getHpMedications(start: Int, limit: Int, sortOrder: String, dependentId: String? = null): Single<List<HPMedicationResult>>
78
79 fun getHpBiometrics(code: String?, codeSystem: String?, codeSystemName: String?, start: Int,
80 limit: Int, sortOrder: String, sourceType: String?, dependentId: String? = null): Single<List<HPBiometricResult>>
81
82 fun getHpBiometricsHistory(code: String, codeSystem: String?, codeSystemName: String?, page: Int,
83 limit: Int, sortOrder: String, sourceType: String?, dependentId: String? = null): Single<List<HPBiometricResult>>
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/phr/healthprofile/DetailedPHREditRepository.kt:83:32Line detected, which is longer than the defined maximum line length in the code style.
80 limit: Int, sortOrder: String, sourceType: String?, dependentId: String? = null): Single<List<HPBiometricResult>>
81
82 fun getHpBiometricsHistory(code: String, codeSystem: String?, codeSystemName: String?, page: Int,
83 limit: Int, sortOrder: String, sourceType: String?, dependentId: String? = null): Single<List<HPBiometricResult>>
84
85 fun addHpBiometrics(biometricsRecords: List<HPBiometricResult>, dependentId: String? = null): Single<List<HPBiometricResult>>
86
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/phr/healthprofile/DetailedPHREditRepository.kt:85:5Line detected, which is longer than the defined maximum line length in the code style.
82 fun getHpBiometricsHistory(code: String, codeSystem: String?, codeSystemName: String?, page: Int,
83 limit: Int, sortOrder: String, sourceType: String?, dependentId: String? = null): Single<List<HPBiometricResult>>
84
85 fun addHpBiometrics(biometricsRecords: List<HPBiometricResult>, dependentId: String? = null): Single<List<HPBiometricResult>>
86
87 fun delHpRecord(category: HealthCategory, id: String?, code: String?, codeSystem: String?, deleteSource: HPDeleteModel, dependentId: String? = null): Completable
88
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/phr/healthprofile/DetailedPHREditRepository.kt:87:5Line detected, which is longer than the defined maximum line length in the code style.
84
85 fun addHpBiometrics(biometricsRecords: List<HPBiometricResult>, dependentId: String? = null): Single<List<HPBiometricResult>>
86
87 fun delHpRecord(category: HealthCategory, id: String?, code: String?, codeSystem: String?, deleteSource: HPDeleteModel, dependentId: String? = null): Completable
88
89 fun addHpMedications(medicationsDetails: List<HPMedicationResult>, dependentId: String? = null): Single<List<HPMedicationResult>>
90
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/phr/healthprofile/DetailedPHREditRepository.kt:89:5Line detected, which is longer than the defined maximum line length in the code style.
86
87 fun delHpRecord(category: HealthCategory, id: String?, code: String?, codeSystem: String?, deleteSource: HPDeleteModel, dependentId: String? = null): Completable
88
89 fun addHpMedications(medicationsDetails: List<HPMedicationResult>, dependentId: String? = null): Single<List<HPMedicationResult>>
90
91 fun addHpCipRecords(category: HealthCategory, cipDetails: List<HPCipResult>, dependentId: String? = null): Single<List<HPCipResult>>
92
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/phr/healthprofile/DetailedPHREditRepository.kt:91:5Line detected, which is longer than the defined maximum line length in the code style.
88
89 fun addHpMedications(medicationsDetails: List<HPMedicationResult>, dependentId: String? = null): Single<List<HPMedicationResult>>
90
91 fun addHpCipRecords(category: HealthCategory, cipDetails: List<HPCipResult>, dependentId: String? = null): Single<List<HPCipResult>>
92
93 fun modHpCipRecord(category: HealthCategory, id: String, cipDetail: HPCipResult, dependentId: String? = null): Single<HPCipResult>
94
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/phr/healthprofile/DetailedPHREditRepository.kt:93:5Line detected, which is longer than the defined maximum line length in the code style.
90
91 fun addHpCipRecords(category: HealthCategory, cipDetails: List<HPCipResult>, dependentId: String? = null): Single<List<HPCipResult>>
92
93 fun modHpCipRecord(category: HealthCategory, id: String, cipDetail: HPCipResult, dependentId: String? = null): Single<HPCipResult>
94
95 fun modHpLabTestRecord(category: HealthCategory, id: String, labTestsDetail: HPLabTestsResult, dependentId: String? = null): Single<HPLabTestsResult>
96
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/phr/healthprofile/DetailedPHREditRepository.kt:95:5Line detected, which is longer than the defined maximum line length in the code style.
92
93 fun modHpCipRecord(category: HealthCategory, id: String, cipDetail: HPCipResult, dependentId: String? = null): Single<HPCipResult>
94
95 fun modHpLabTestRecord(category: HealthCategory, id: String, labTestsDetail: HPLabTestsResult, dependentId: String? = null): Single<HPLabTestsResult>
96
97 fun modHpMedication(medicationDetails: HPMedicationResult, dependentId: String? = null): Single<HPMedicationResult>
98
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/phr/healthprofile/DetailedPHREditRepository.kt:99:5Line detected, which is longer than the defined maximum line length in the code style.
96
97 fun modHpMedication(medicationDetails: HPMedicationResult, dependentId: String? = null): Single<HPMedicationResult>
98
99 fun getCiMedicationsImages(minWidth: Int, codes: List<List<CIMedicationCode>>): Single<List<CIMedicationImageResult>>
100
101 fun getCiMedicationsDetails(codes: List<List<CIMedicationCode>>): Single<List<CIMedicationDetailResult>>
102
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/phr/healthprofile/DetailedPHREditRepository.kt:107:5Line detected, which is longer than the defined maximum line length in the code style.
104
105 fun getCiCipDetails(category: HealthCategory, codes: List<List<CIMedicationCode>>): Single<List<CICipDetailResult>>
106
107 fun getCiMedicationsDoseFormStrengths(codes: List<List<CIMedicationCode>>): Single<List<CIMedicationDetailDoseFormStrengthsResult>>
108
109 fun getCiCipSuggestions(category: HealthCategory, input: String, start: Int, limit: Int): Single<List<CICipSuggestionData>>
110
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/phr/healthprofile/DetailedPHREditRepository.kt:109:5Line detected, which is longer than the defined maximum line length in the code style.
106
107 fun getCiMedicationsDoseFormStrengths(codes: List<List<CIMedicationCode>>): Single<List<CIMedicationDetailDoseFormStrengthsResult>>
108
109 fun getCiCipSuggestions(category: HealthCategory, input: String, start: Int, limit: Int): Single<List<CICipSuggestionData>>
110
111 fun getHpCipRecords(category: HealthCategory, start: Int, limit: Int, sortOrder: String, dependentId: String? = null): Single<List<HPCipResult>>
112
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/phr/healthprofile/DetailedPHREditRepository.kt:111:5Line detected, which is longer than the defined maximum line length in the code style.
108
109 fun getCiCipSuggestions(category: HealthCategory, input: String, start: Int, limit: Int): Single<List<CICipSuggestionData>>
110
111 fun getHpCipRecords(category: HealthCategory, start: Int, limit: Int, sortOrder: String, dependentId: String? = null): Single<List<HPCipResult>>
112
113 fun getHpCipHistoryRecords(category: HealthCategory, code: String, codeSystem: String?, codeSystemName: String?,
114 start: Int, limit: Int, sortOrder: String, dependentId: String?= null): Single<List<HPCipResult>>
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/phr/healthprofile/DetailedPHREditRepository.kt:114:32Line detected, which is longer than the defined maximum line length in the code style.
111 fun getHpCipRecords(category: HealthCategory, start: Int, limit: Int, sortOrder: String, dependentId: String? = null): Single<List<HPCipResult>>
112
113 fun getHpCipHistoryRecords(category: HealthCategory, code: String, codeSystem: String?, codeSystemName: String?,
114 start: Int, limit: Int, sortOrder: String, dependentId: String?= null): Single<List<HPCipResult>>
115
116 fun getCiMedicationsInfosheets(codes: List<List<CIMedicationCode>>): Single<List<CIMedicationInfosheetResult>>
117
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/phr/healthprofile/DetailedPHREditRepository.kt:120:5Line detected, which is longer than the defined maximum line length in the code style.
117
118 fun deleteHealthRecordsHistoryByCategory(healthRecordType: HealthRecordType)
119
120 fun getHpLabTests(start: Int, limit: Int, sortOrder: String, dependentId: String? = null): Single<List<HPLabTestsResult>>
121
122 fun getHpLabTestsHistory(code: String, codeSystem: String?, codeSystemName: String?,
123 start: Int, limit: Int, sortOrder: String, dependentId: String? = null): Single<List<HPLabTestsResult>>
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/phr/healthprofile/DetailedPHREditRepository.kt:123:30Line detected, which is longer than the defined maximum line length in the code style.
120 fun getHpLabTests(start: Int, limit: Int, sortOrder: String, dependentId: String? = null): Single<List<HPLabTestsResult>>
121
122 fun getHpLabTestsHistory(code: String, codeSystem: String?, codeSystemName: String?,
123 start: Int, limit: Int, sortOrder: String, dependentId: String? = null): Single<List<HPLabTestsResult>>
124
125 fun getCiLabTestsDetails(codes: List<List<CIMedicationCode>>): Single<List<CILabTestsDetailResult>>
126
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/phr/healthprofile/DetailedPHREditRepository.kt:129:5Line detected, which is longer than the defined maximum line length in the code style.
126
127 fun getCiBiometricsCategories(gender: String?): Single<List<CIBiometricsCategory>>
128
129 fun getHpAllergies(start: Int, limit: Int, sortOrder: String, dependantId: String? = null): Single<List<HPAllergyResult>>
130
131 fun getHpAllergiesHistory(code: String, codeSystem: String?, codeSystemName: String?,
132 start: Int, limit: Int, sortOrder: String, dependentId: String? = null): Single<List<HPAllergyResult>>
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/phr/healthprofile/DetailedPHREditRepository.kt:132:31Line detected, which is longer than the defined maximum line length in the code style.
129 fun getHpAllergies(start: Int, limit: Int, sortOrder: String, dependantId: String? = null): Single<List<HPAllergyResult>>
130
131 fun getHpAllergiesHistory(code: String, codeSystem: String?, codeSystemName: String?,
132 start: Int, limit: Int, sortOrder: String, dependentId: String? = null): Single<List<HPAllergyResult>>
133
134 fun addHpAllergies(allergyDetails: List<HPAllergyResult>, dependentId: String? = null): Single<List<HPAllergyResult>>
135
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/phr/healthprofile/DetailedPHREditRepository.kt:134:5Line detected, which is longer than the defined maximum line length in the code style.
131 fun getHpAllergiesHistory(code: String, codeSystem: String?, codeSystemName: String?,
132 start: Int, limit: Int, sortOrder: String, dependentId: String? = null): Single<List<HPAllergyResult>>
133
134 fun addHpAllergies(allergyDetails: List<HPAllergyResult>, dependentId: String? = null): Single<List<HPAllergyResult>>
135
136 fun modHpAllergy(id: String, allergyDetail: HPAllergyResult, dependentId: String? = null): Single<HPAllergyResult>
137 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/places/PlaceDetailsDataRepository.kt:12:5Line detected, which is longer than the defined maximum line length in the code style.
9
10 private val service = PlacesService()
11
12 override fun getPlaceSearch(searchKey: String, location: String, type: String?, radius: Int): Single<MapPlaceResult> {
13 val search = searchKey.split(" ").first()
14 return service.placesSearch(location, radius, type, search, apiKey)
15 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/sharedpreferences/OrigamiSharedPreferencesRepository.kt:307:1Line detected, which is longer than the defined maximum line length in the code style.
304
305 }
306
307 class OrigamiSharedPreferencesRepositoryImpl(private val sharedPreferences: SharedPreferences) : OrigamiSharedPreferencesRepository {
308
309 override fun getSelectedDate(): String = sharedPreferences
310 .getString(KEY_SELECTED_DATE, DateTime.now().toTrackerDateString())!!
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/sharedpreferences/OrigamiSharedPreferencesRepository.kt:465:9Line detected, which is longer than the defined maximum line length in the code style.
462 isSleepAutoTracked() || isStepsAutoTracked()
463
464 override fun getSelectedTrackerTypeOrNull(): OrigamiTrackerType? {
465 val typeName = sharedPreferences.getString(KEY_SELECTED_TRACKER_TYPE_NAME, KEY_SELECTED_TRACKER_TYPE_NAME_DEFAULT)
466 ?: KEY_SELECTED_TRACKER_TYPE_NAME_DEFAULT
467 return OrigamiTrackerType.getByName(typeName)
468 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/sharedpreferences/OrigamiSharedPreferencesRepository.kt:566:9Line detected, which is longer than the defined maximum line length in the code style.
563 const val KEY_GREEN_DAY_PROGRAM_START_DAY = "key_green_day_program_start_day"
564 const val KEY_SELECTED_DATE = "key_selected_date"
565 const val KEY_DASHBOARD_LAST_UPDATED_DATE = "key_dashboard_last_updated_date"
566 const val DASHBOARD_NO_GREENDAY_UPDATES_THRESHOLD_IN_MINUTES = 10 // if a user goes back and forth to the dashboard – we don't want it to trigger updates unless it's necessary
567
568 // Settings for the tooltips and other one-time UI
569 const val KEY_STEPS_INFO_TIP_TO_SHOW = "automatic_tracking_info_tip_dismissed"
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/sharedpreferences/StepsPreferenceStore.kt:21:9Line detected, which is longer than the defined maximum line length in the code style.
18
19 @JvmStatic
20 fun setDailyTotalNumberOfSteps(todaySteps: Int) {
21 getStepsPreferences()?.edit()?.putInt(DAILY_TOTAL_NUMBER_OF_STEPS + DateUtil.getTodayDate(), todaySteps)?.apply()
22 }
23
24 @JvmStatic
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/sharedpreferences/TrackerPreferenceStore.kt:18:5Line detected, which is longer than the defined maximum line length in the code style.
15
16 @SuppressLint("StaticFieldLeak")
17 object TrackerPreferenceStore {
18 private fun <T> transferValueFromPreferences(key: String, clazz: Class<T>, defaultValue: T, action: (value: T) -> Unit) {
19 if (getPreferences()?.contains(key) == true) {
20 val pref = getPreference(key, clazz, defaultValue)
21 action(pref)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/sharedpreferences/TrackerPreferenceStore.kt:26:5Line detected, which is longer than the defined maximum line length in the code style.
23 }
24 }
25
26 private fun <T> transferValueFromDefaultPreferences(key: String, clazz: Class<T>, defaultValue: T, action: (value: T) -> Unit) {
27 if (getPreferences()?.contains(key) == true) {
28 val pref = getDefaultPreference(key, clazz, defaultValue)
29 action(pref)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/sharedpreferences/TrackerPreferenceStore.kt:44:13Line detected, which is longer than the defined maximum line length in the code style.
41 repo.setTrackerWizardOnDashboardToShow(it)
42 }
43
44 transferValueFromPreferences(SLEEP_DETECTION_ENABLED_KEY, Boolean::class.java, !BuildConfig.FEATURE_ENABLED_MICROPHONE_TURN_OFF) {
45 repo.setSleepAutoTracked(it)
46 }
47
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/repository/sharedpreferences/TrackerPreferenceStore.kt:90:17Line detected, which is longer than the defined maximum line length in the code style.
87 }
88
89 if (getPreferences()?.contains(STEPS_OPEN_WINDOW_KEY) == true) {
90 (getPreference<StepsWindowModel?>(STEPS_OPEN_WINDOW_KEY, StepsWindowModel::class.java, null))?.let { pref ->
91 repo.setStepsWindowModel(pref)
92 }
93 removeKey(getPreferences(), STEPS_OPEN_WINDOW_KEY)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/searchnavigation/SearchNavigationViewHolder.kt:13:9Line detected, which is longer than the defined maximum line length in the code style.
10 class SearchNavigationViewHolder(val holder: NavigationListItemBinding) : RecyclerView.ViewHolder(holder.root) {
11
12 companion object {
13 fun create(inflater: LayoutInflater, parent: ViewGroup) = SearchNavigationViewHolder(NavigationListItemBinding.inflate(inflater, parent, false))
14 }
15
16 fun onBind(navLink: SearchNavigation, listener: SearchNavigationAdapter.OnNavigationLinkClickListener) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/service/BaseForegroundService.kt:83:13Line detected, which is longer than the defined maximum line length in the code style.
80
81 private fun isServiceRunning(context: Context, serviceClass: Class<out Service>): Boolean {
82 val activityManager = context.getSystemService(Context.ACTIVITY_SERVICE) as ActivityManager
83 val runningService = activityManager.getRunningServices(Integer.MAX_VALUE).firstOrNull { it.service.className == serviceClass.name }
84 return runningService?.let {
85 SystemClock.uptimeMillis() - runningService.lastActivityTime > SAFETY_TIME_5_SECONDS
86 } ?: false
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/service/ForegroundServiceManager.kt:47:17Line detected, which is longer than the defined maximum line length in the code style.
44 .setContentTitle(service.getString(R.string.foreground_service_notification_title))
45 .setContentText(makeCurrentText(service))
46 .setDefaults(NotificationCompat.DEFAULT_ALL.inv())
47 .setContentIntent(PendingIntent.getActivity(service, 0, Intent(CONFIG_ACTION), PendingIntent.FLAG_IMMUTABLE))
48 .build()
49 }
50
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/services/PlacesService.kt:40:5Line detected, which is longer than the defined maximum line length in the code style.
37 }
38
39
40 fun placesSearch(location: String, distance: Int, type: String?, search: String, apiKey: String): Single<MapPlaceResult> {
41 return service.placesSearch(location, distance, type, search, apiKey)
42 }
43
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/services/SecureImageService.kt:86:5Line detected, which is longer than the defined maximum line length in the code style.
83 .withDefaultSchedulers()
84 }
85
86 data class ImageMetaData(val _id: String, val owner: String, val type: String, val fileName: String, val lastAccessed: String, val created: String)
87
88 fun fetchCategoryImagesList(category: String): Single<ImagesMetaData> {
89 return bearerProxy
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/services/SecureImageService.kt:119:9Line detected, which is longer than the defined maximum line length in the code style.
116
117 interface Proxy {
118 @PUT("/secure-image/files")
119 fun putImage(@Query("category") category: String, @Body requestBody: RequestBody, @Query("account") entityReference: String): Single<UploadResult>
120
121 @GET("/secure-image/files")
122 fun getCategoryImagesList(@Query("category") category: String, @Query("account") entityReference: String): Single<ImagesMetaData>
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/services/SecureImageService.kt:122:9Line detected, which is longer than the defined maximum line length in the code style.
119 fun putImage(@Query("category") category: String, @Body requestBody: RequestBody, @Query("account") entityReference: String): Single<UploadResult>
120
121 @GET("/secure-image/files")
122 fun getCategoryImagesList(@Query("category") category: String, @Query("account") entityReference: String): Single<ImagesMetaData>
123
124 @GET("/secure-image/files/{mongoId}")
125 fun getImage(@Path("mongoId") id: String, @Query("with") with: String, @Query("fileType") fileType: String = "jpeg"): Single<ResponseBody>
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/services/SecureImageService.kt:125:9Line detected, which is longer than the defined maximum line length in the code style.
122 fun getCategoryImagesList(@Query("category") category: String, @Query("account") entityReference: String): Single<ImagesMetaData>
123
124 @GET("/secure-image/files/{mongoId}")
125 fun getImage(@Path("mongoId") id: String, @Query("with") with: String, @Query("fileType") fileType: String = "jpeg"): Single<ResponseBody>
126
127 @DELETE("/secure-image/files/{mongoId}")
128 fun deleteImage(@Path("mongoId") id: String): Completable
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/theme/ThemeConfiguration.kt:35:9Line detected, which is longer than the defined maximum line length in the code style.
32 REWARDS("rewards"),
33 CHALLENGES("challenges"),
34 COACHING("coaching"),
35 PROGRAMS("programs"), // This one isn't in https://confluence.feingoldtech.com/display/SL/Dynamic+Image+Configuration yet
36 FEED_TOP_VIEW("feed_top_video"),
37 }
38 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/theme/ThemeManager.kt:14:1Line detected, which is longer than the defined maximum line length in the code style.
11 import com.sharecare.realgreen.core.tool.annotations.ComponentType
12 import com.sharecare.realgreen.core.tool.annotations.CoreComponent
13
14 @CoreComponent(msg = "used for getting a theme from the server and storing it locally and using the theme obj across the app",
15 type = ComponentType.Theme)
16 object ThemeManager {
17
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/tool/FullscreenInformationDialog.kt:28:13Line detected, which is longer than the defined maximum line length in the code style.
25 this.getNavigationController().hideBottomMenu()
26 with(binding) {
27 arguments?.let { icon.setImageResource(it.getInt(EXTRA_ICON)) }
28 if (arguments?.getInt(EXTRA_TITLE) != 0) arguments?.let { title.setText(it.getInt(EXTRA_TITLE)) } else title.visibility = View.GONE
29 arguments?.let { description.setText(it.getInt(EXTRA_DESCRIPTION)) }
30 description.movementMethod = ScrollingMovementMethod()
31 arguments?.let { gotItButton.setText(it.getInt(EXTRA_BUTTON)) }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/tool/UiExtensions.kt:40:5Line detected, which is longer than the defined maximum line length in the code style.
37
38
39 fun View.bottomRight(allowZero: Boolean = false): PixelCoordinates {
40 if (!allowZero && (height == 0 || width == 0)) throw RuntimeException("Zero height & width ruled out. Ensure the view is rendered or allow for zero")
41 val xy = IntArray(2)
42 this.getLocationOnScreen(xy)
43 return xy[0] + this.width to xy[1] + this.height
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/tool/UiExtensions.kt:47:5Line detected, which is longer than the defined maximum line length in the code style.
44 }
45
46 fun View.center(allowZero: Boolean = false): PixelCoordinates {
47 if (!allowZero && (height == 0 || width == 0)) throw RuntimeException("Zero height & width ruled out. Ensure the view is rendered or allow for zero")
48 val xy = IntArray(2)
49 this.getLocationOnScreen(xy)
50 return xy[0] + this.width / 2 to xy[1] + this.height / 2
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/tool/UiExtensions.kt:55:5Line detected, which is longer than the defined maximum line length in the code style.
52
53
54 fun View.topCenter(allowZero: Boolean = false): PixelCoordinates {
55 if (!allowZero && (height == 0 || width == 0)) throw RuntimeException("Zero height & width ruled out. Ensure the view is rendered or allow for zero")
56 val xy = IntArray(2)
57 this.getLocationOnScreen(xy)
58 return xy[0] + this.width / 2 to xy[1]
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/tool/WindowInsetView.kt:13:1Line detected, which is longer than the defined maximum line length in the code style.
10 import kotlin.math.max
11 import kotlin.properties.Delegates
12
13 class WindowInsetView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0) : View(context, attrs, defStyleAttr) {
14
15 object WindowInsetDirection {
16 const val NONE = 0
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/tool/WindowInsetView.kt:71:9Line detected, which is longer than the defined maximum line length in the code style.
68 minHeightDefinedByInsets += insets.bottom
69 }
70
71 setMeasuredDimension(max(suggestedMinimumWidth, minWidthDefinedByInsets), max(suggestedMinimumHeight, minHeightDefinedByInsets))
72 }
73
74 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/tool/annotations/CoreAnnotations.kt:10:1Line detected, which is longer than the defined maximum line length in the code style.
7 * @developer : main developer the annotation is relevant to; ideally the developer that should react to the annotation
8 */
9 @Retention(AnnotationRetention.SOURCE)
10 annotation class CoreComponent(val msg: String = "", val type: ComponentType = ComponentType.Unspecified, val developer: Developer = Developer.UNSPECIFIED)
11
12 /**
13 * Marks a utility
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/tool/annotations/CoreAnnotations.kt:19:1Line detected, which is longer than the defined maximum line length in the code style.
16 * @developer : main developer the annotation is relevant to; ideally the developer that should react to the annotation
17 */
18 @Retention(AnnotationRetention.SOURCE)
19 annotation class Utility(val msg: String = "", val type: UtilityType = UtilityType.Unspecified, val developer: Developer = Developer.UNSPECIFIED)
20
21
22 /**
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/tool/annotations/RefacAnnotations.kt:7:1Line detected, which is longer than the defined maximum line length in the code style.
4 * Annotation to mark refactoring targets
5 */
6 @Retention(AnnotationRetention.SOURCE)
7 annotation class Refactoring(val tag: Tag = Tag.None, val complexity:Complexity = Complexity.Unspecified, val msg: String = "", val developer: Developer = Developer.UNSPECIFIED)
8
9 /**
10 * Annotation to mark migration targets
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/tool/listadapter/HeaderFooterListAdapter.kt:10:2Line detected, which is longer than the defined maximum line length in the code style.
7 import com.sharecare.realgreen.core.tool.listadapter.viewholder.BindableViewHolder
8
9 /**
10 * Class that supports one header and/or one footer view. Such views should have some wrapper (like FrameLayout) for keeping layout params
11 */
12 abstract class HeaderFooterListAdapter<Element, VH : BindableViewHolder<Element>>(
13 items: List<Element>, private val loaderViewMode: LayoutMode = LayoutMode.VERTICAL) :
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/tool/listadapter/HeaderFooterListAdapter.kt:77:5Line detected, which is longer than the defined maximum line length in the code style.
74 return currentPosition + if (header == null) 0 else -1
75 }
76
77 private class HeaderFooterViewHolder(itemView: View, loaderViewMode: LayoutMode) : RecyclerView.ViewHolder(itemView) {
78 init {
79 itemView.layoutParams =
80 if (loaderViewMode == LayoutMode.HORIZONTAL) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/tool/listadapter/viewholder/BindableViewHolder.kt:9:1Line detected, which is longer than the defined maximum line length in the code style.
6 import com.sharecare.realgreen.core.util.setSingleClickListener
7
8
9 abstract class BindableViewHolder<T> @JvmOverloads constructor(itemView: View, private val clickView: View = itemView) : RecyclerView.ViewHolder(itemView) {
10
11 protected var item: T? = null
12
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/tool/listadapter/viewholder/LeftIconOneLineListItemViewHolder.kt:9:41Line detected, which is longer than the defined maximum line length in the code style.
6 import com.sharecare.realgreen.core.tool.listadapter.data.OneLineIconListItemField
7
8 class LeftIconOneLineListItemViewHolder(private val binding: LeftIconOneLineListItemBinding,
9 private val itemListener: ItemClickListener<OneLineIconListItem<OneLineIconListItemField>>) :
10 BindableViewHolder<OneLineIconListItem<OneLineIconListItemField>>(binding.root) {
11 override fun onBind(item: OneLineIconListItem<OneLineIconListItemField>) {
12 binding.container.title.text = item.title
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/tool/listadapter/viewholder/LeftIconTwoLineListItemViewHolder.kt:9:41Line detected, which is longer than the defined maximum line length in the code style.
6 import com.sharecare.realgreen.core.tool.listadapter.data.TwoLineIconListItemField
7
8 class LeftIconTwoLineListItemViewHolder(private val binding: LeftIconTwoLineListItemBinding,
9 private val itemListener: ItemClickListener<TwoLineIconListItem<TwoLineIconListItemField>>) :
10 BindableViewHolder<TwoLineIconListItem<TwoLineIconListItemField>>(binding.root) {
11 override fun onBind(item: TwoLineIconListItem<TwoLineIconListItemField>) {
12 binding.container.title.text = item.title
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/tool/listadapter/viewholder/RightIconOneLineListItemViewHolder.kt:9:42Line detected, which is longer than the defined maximum line length in the code style.
6 import com.sharecare.realgreen.core.tool.listadapter.data.OneLineIconListItemField
7
8 class RightIconOneLineListItemViewHolder(private val binding: RightIconOneLineListItemBinding,
9 private val itemListener: ItemClickListener<OneLineIconListItem<OneLineIconListItemField>>) :
10 BindableViewHolder<OneLineIconListItem<OneLineIconListItemField>>(binding.root) {
11 override fun onBind(item: OneLineIconListItem<OneLineIconListItemField>) {
12 binding.container.title.text = item.title
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/tool/listadapter/viewholder/RightIconTwoLineListItemViewHolder.kt:9:42Line detected, which is longer than the defined maximum line length in the code style.
6 import com.sharecare.realgreen.core.tool.listadapter.data.TwoLineIconListItemField
7
8 class RightIconTwoLineListItemViewHolder(private val binding: RightIconTwoLineListItemBinding,
9 private val itemListener: ItemClickListener<TwoLineIconListItem<TwoLineIconListItemField>>) :
10 BindableViewHolder<TwoLineIconListItem<TwoLineIconListItemField>>(binding.root) {
11 override fun onBind(item: TwoLineIconListItem<TwoLineIconListItemField>) {
12 binding.container.title.text = item.title
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/tool/tooltip/QuickAction.kt:88:9Line detected, which is longer than the defined maximum line length in the code style.
85
86 val titleText = action.title
87 val positiveButtonText = action.positiveButton
88 val container = DataBindingUtil.inflate<ActionItemHorizontalBinding>(inflater, R.layout.action_item_horizontal, null, false)
89 container.title.setTextOrHide(titleText)
90 container.positiveButton.setTextOrHide(positiveButtonText)
91 container.positiveButton.setOnClickListener {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/tool/tooltip/TooltipDialog.kt:48:5Line detected, which is longer than the defined maximum line length in the code style.
45 ) : Dialog(activity, themeStyleRes), TooltipDialogAbstraction, TooltipDialogApi by api, Logger by logs {
46
47 private var targetView: View? = null
48 private val binding: TooltipDialogTagBinding by lazy { TooltipDialogTagBinding.inflate(LayoutInflater.from(context), null, false) }
49
50 private var toolTipListener: ToolTipListener = object : ToolTipListener {
51 override fun onSkipToolTip(dialog: Dialog) = onSkip(this@TooltipDialog)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/tool/tooltip/TooltipDialog.kt:65:17Line detected, which is longer than the defined maximum line length in the code style.
62 actionButton.setOnClickListener { toolTipListener.onClickToolTip(this@TooltipDialog) }
63 setCancelable(false)
64 root.monitorRendering { count ->
65 //On some devices there is an android bug that the toolbar height is not properly measured during the first layout passes. This resolves the issue (it needs to layout up to 3 timers for correct height)
66 if (count <= 3) {
67 logScreenState("Layout pass count = $count")
68 performPositioning()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/tool/tooltip/TooltipDialog.kt:92:9Line detected, which is longer than the defined maximum line length in the code style.
89
90 private fun logScreenState(trigger: String) {
91 logScreenMeasures(activity, trigger)
92 logMeasures(listOf(binding.root to "root", binding.contentView to "contentView", topInset() to "topInset", bottomInset() to "bottomInset"), trigger)
93 }
94
95
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/tool/tooltip/TooltipDialog.kt:97:9Line detected, which is longer than the defined maximum line length in the code style.
94
95
96 private fun drawOverlaySurface(): BitmapDrawable {
97 val bitmap = Bitmap.createBitmap(binding.overlay.bottomRight().x(), binding.overlay.bottomRight().y(), Bitmap.Config.ARGB_8888)
98 val canvas = Canvas(bitmap)
99 bitmap.eraseColor(Color.TRANSPARENT)
100 canvas.drawColor(ContextCompat.getColor(context, R.color.tooltip_dialog_background_shade_dark))
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/tool/tooltip/TooltipDialog.kt:107:13Line detected, which is longer than the defined maximum line length in the code style.
104 eraser.color = -0x16
105 eraser.xfermode = PorterDuffXfermode(PorterDuff.Mode.CLEAR)
106 targetView?.let { view ->
107 val scaleFactor = binding.overlay.bottomRight().y().toFloat() / (binding.overlay.bottomRight().y().toFloat() - binding.overlay.topLeft().y().toFloat())
108 val origin = view.topLeft()
109 val statusBarY = binding.overlay.topLeft().y().toFloat()
110 val xStart = origin.x().toFloat()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/tool/tooltip/TooltipDialog.kt:120:13Line detected, which is longer than the defined maximum line length in the code style.
117 val bottom = maxOf(yBottom, yCenter + 24.toPixels(context).toFloat())
118 val start = minOf(xCenter - (view.width.toFloat() * 0.5f), xCenter - 24.toPixels(context).toFloat())
119 val end = maxOf(xCenter + (view.width.toFloat() * 0.5f), xCenter + 24.toPixels(context).toFloat())
120 canvas.drawRoundRect(start, top, end, bottom, 8.toPixels(context).toFloat(), 8.toPixels(context).toFloat(), eraser)
121
122 }
123 val drawable = BitmapDrawable(context.resources, bitmap)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/tool/tooltip/TooltipDialog.kt:145:21Line detected, which is longer than the defined maximum line length in the code style.
142 yTop > upAnchor() -> placeTooltipAbove(xCenter to yTop.toInt())
143 yBottom < lowAnchor() -> placeTooltipBellow(xCenter to yBottom.toInt())
144 else -> {
145 w("There is not enough space. yTop = $yTop / yBottom= $yBottom ; upAnchor = ${upAnchor()} / lowAnchor = ${lowAnchor()} ")
146 placeTooltipBellow(xCenter to (yTop + yBottom / 2f).toInt())
147 }
148 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/type/FrequencyType.kt:6:5Line detected, which is longer than the defined maximum line length in the code style.
3 import com.sharecare.realgreen.core.repository.PreferenceStore
4
5 enum class FrequencyType(val desc: String) {
6 FEED_UPDATE_SERVICE_POLING("Set up the frequency of pooling feed items for the timeline. \nDefault value is 20 minutes"),
7 COLLECTING_STEPS_FROM_GF("Set up the frequency of collecting steps from google fit. \nDefault value is 25 to 30 minutes"),
8 SENDING_COLLECTED_DATA_TO_SERVER("Set up the frequency of sending recorded data to the server. \nDefault value is 5 minutes"),
9 CONFIGURATION_REFRESHING("Set up the frequency of refreshing the configuration. \nDefault value is 5 minutes");
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/type/FrequencyType.kt:7:5Line detected, which is longer than the defined maximum line length in the code style.
4
5 enum class FrequencyType(val desc: String) {
6 FEED_UPDATE_SERVICE_POLING("Set up the frequency of pooling feed items for the timeline. \nDefault value is 20 minutes"),
7 COLLECTING_STEPS_FROM_GF("Set up the frequency of collecting steps from google fit. \nDefault value is 25 to 30 minutes"),
8 SENDING_COLLECTED_DATA_TO_SERVER("Set up the frequency of sending recorded data to the server. \nDefault value is 5 minutes"),
9 CONFIGURATION_REFRESHING("Set up the frequency of refreshing the configuration. \nDefault value is 5 minutes");
10
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/type/FrequencyType.kt:8:5Line detected, which is longer than the defined maximum line length in the code style.
5 enum class FrequencyType(val desc: String) {
6 FEED_UPDATE_SERVICE_POLING("Set up the frequency of pooling feed items for the timeline. \nDefault value is 20 minutes"),
7 COLLECTING_STEPS_FROM_GF("Set up the frequency of collecting steps from google fit. \nDefault value is 25 to 30 minutes"),
8 SENDING_COLLECTED_DATA_TO_SERVER("Set up the frequency of sending recorded data to the server. \nDefault value is 5 minutes"),
9 CONFIGURATION_REFRESHING("Set up the frequency of refreshing the configuration. \nDefault value is 5 minutes");
10
11 fun getValue(): Int {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/type/SearchResultType.kt:7:1Line detected, which is longer than the defined maximum line length in the code style.
4 import com.feingoldtech.models.search.SearchType
5 import com.sharecare.realgreen.core.R
6
7 enum class SearchResultType(val searchType: SearchType, @param:StringRes val itemTitleId: Int, @param:StringRes val tabTitleId: Int) {
8 ARTICLE(SearchType.ARTICLE, R.string.search_article, R.string.tab_articles),
9 VIDEO(SearchType.VIDEO, R.string.search_video, R.string.tab_videos),
10 SLIDESHOW(SearchType.SLIDESHOW, R.string.search_slideshow, R.string.tab_slideshows),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/InetConnectivityWatchdog.kt:28:5Line detected, which is longer than the defined maximum line length in the code style.
25 */
26 @CoreComponent(msg = "Utility class to track Internet connection state", type = ComponentType.Network)
27 class InetConnectivityWatchdog(private var context: Context) : LiveData<Boolean>() {
28 private val connectivityManager: ConnectivityManager = context.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
29
30 private var networkCallback: Any? = null
31 private var netStateBroadcastReceiver: BroadcastReceiver? = null
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/InetConnectivityWatchdog.kt:54:17Line detected, which is longer than the defined maximum line length in the code style.
51 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
52 connectivityManager.registerDefaultNetworkCallback(networkCallback as NetworkCallback)
53 } else {
54 connectivityManager.registerNetworkCallback(NetworkRequest.Builder().build(), networkCallback as NetworkCallback)
55 }
56 } else {
57 netStateBroadcastReceiver = object : BroadcastReceiver() {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/InstallReferrerUtil.kt:49:21Line detected, which is longer than the defined maximum line length in the code style.
46 }
47 }catch (e:Exception){
48 L.e("Failed to handle referer setup finish: ${e.message}",e)
49 AnalyticsCore.error("Failed to handle referer setup finish: ${e.message}", errorMessage = "Failed to handle referer setup finish: ${e.message}", stackTrace = null)
50 }
51 }
52
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/KeyboardEventListener.kt:13:1Line detected, which is longer than the defined maximum line length in the code style.
10 import com.sharecare.realgreen.core.tool.annotations.CoreComponent
11
12 @CoreComponent(msg = "Listener for Keyboard events for eg: keyboard open/close", type = ComponentType.Event)
13 class KeyboardEventListener(private val activity: AppCompatActivity, private val callback: (isOpen: Boolean) -> Unit) : LifecycleObserver {
14
15 private val listener = object : ViewTreeObserver.OnGlobalLayoutListener {
16 private var lastState: Boolean = activity.isKeyboardOpen()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/LinkDispatcherClient.kt:23:17Line detected, which is longer than the defined maximum line length in the code style.
20 */
21 fun dispatchManually(context: Context, url: String, analyticsInfo: FeedItemAnalyticsInfo? = null) {
22 if (WebHostType.containsAnyHostUrl(context.resources, url)) {
23 /*
24 * Activity context is not cast to Navigation Provider context so Passing the Deeplink url to RootHostActivity
25 * and Handling the Deeplink there
26 */
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/NavigatorCoreUtil.kt:473:37Line detected, which is longer than the defined maximum line length in the code style.
470 enrolmentWebView -> {
471 if (context is NavigationProvider) {
472 context.getNavigationController()
473 .goToNextFragment(EnrolmentWebViewFragment.makeInstance(webUrl), replaceInContainer = replaceContainer)
474 } else {
475 ExternalWebViewActivity.startEnrolmentWebView(context, webUrl)
476 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/NavigatorCoreUtil.kt:483:37Line detected, which is longer than the defined maximum line length in the code style.
480 else -> {
481 if (context is NavigationProvider) {
482 context.getNavigationController()
483 .goToNextFragment(fragment = WebViewFragment.makeInstance(webUrl, url), replaceInContainer = replaceContainer)
484 } else {
485 ExternalWebViewActivity.start(context, webUrl, url)
486 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/NavigatorCoreUtil.kt:545:6Line detected, which is longer than the defined maximum line length in the code style.
542
543
544 /**
545 * This url contains the necessary query parameters to do an "sso bounce" (authenticate a url using sso then redirect to it).
546 * It can be used to either open in an in-app webview or in the external browser
547 */
548 @Decouple("Decouple for this class ; Extension on ConfigurationManager manager")
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/NavigatorCoreUtil.kt:590:9Line detected, which is longer than the defined maximum line length in the code style.
587
588 @Decouple("Extract from this class; Make extension on AppConfiguration")
589 private fun isAnAuthorizedPartner(url: String): Boolean {
590 val friendsAndFamilyConfiguration = ConfigurationManager::class.inject().getConfiguration().getFeatureConfiguration(FeatureConfigurationType.FRIENDS_AND_FAMILY) as UrlConfiguration
591 return url == friendsAndFamilyConfiguration.getUrlLink()
592 }
593
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/RatValues.kt:29:17Line detected, which is longer than the defined maximum line length in the code style.
26
27 fun getRealAgeString(resources: Resources, inString: Boolean = false) =
28 if (inString) {
29 resources.getString(R.string.real_age_value_string, appendZeroToNumber(realAgeYears), appendZeroToNumber(realAgeMonths))
30 } else {
31 resources.getString(R.string.real_age_value, realAgeYears, realAgeMonths)
32 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/RxExtensions.kt:14:1Line detected, which is longer than the defined maximum line length in the code style.
11
12 @Utility(msg = "Extension class for setting schedulers to the observers when subscribed", type = UtilityType.Extensions)
13
14 fun <T> Single<T>.withBackgroundSchedulers() = subscribeOn(BasePresenter.subscribeScheduler).observeOn(BasePresenter.subscribeScheduler)
15 fun <T> Single<T>.withDefaultSchedulers() = subscribeOn(BasePresenter.subscribeScheduler).observeOn(BasePresenter.observeScheduler)
16 fun Completable.withDefaultSchedulers() = subscribeOn(BasePresenter.subscribeScheduler).observeOn(BasePresenter.observeScheduler)
17 fun Completable.withBackgroundSchedulers() = subscribeOn(BasePresenter.subscribeScheduler).observeOn(BasePresenter.subscribeScheduler)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/RxExtensions.kt:15:1Line detected, which is longer than the defined maximum line length in the code style.
12 @Utility(msg = "Extension class for setting schedulers to the observers when subscribed", type = UtilityType.Extensions)
13
14 fun <T> Single<T>.withBackgroundSchedulers() = subscribeOn(BasePresenter.subscribeScheduler).observeOn(BasePresenter.subscribeScheduler)
15 fun <T> Single<T>.withDefaultSchedulers() = subscribeOn(BasePresenter.subscribeScheduler).observeOn(BasePresenter.observeScheduler)
16 fun Completable.withDefaultSchedulers() = subscribeOn(BasePresenter.subscribeScheduler).observeOn(BasePresenter.observeScheduler)
17 fun Completable.withBackgroundSchedulers() = subscribeOn(BasePresenter.subscribeScheduler).observeOn(BasePresenter.subscribeScheduler)
18 fun <T> Observable<T>.withDefaultSchedulers() = subscribeOn(BasePresenter.subscribeScheduler).observeOn(BasePresenter.observeScheduler)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/RxExtensions.kt:16:1Line detected, which is longer than the defined maximum line length in the code style.
13
14 fun <T> Single<T>.withBackgroundSchedulers() = subscribeOn(BasePresenter.subscribeScheduler).observeOn(BasePresenter.subscribeScheduler)
15 fun <T> Single<T>.withDefaultSchedulers() = subscribeOn(BasePresenter.subscribeScheduler).observeOn(BasePresenter.observeScheduler)
16 fun Completable.withDefaultSchedulers() = subscribeOn(BasePresenter.subscribeScheduler).observeOn(BasePresenter.observeScheduler)
17 fun Completable.withBackgroundSchedulers() = subscribeOn(BasePresenter.subscribeScheduler).observeOn(BasePresenter.subscribeScheduler)
18 fun <T> Observable<T>.withDefaultSchedulers() = subscribeOn(BasePresenter.subscribeScheduler).observeOn(BasePresenter.observeScheduler)
19 fun <T> Flowable<T>.withDefaultSchedulers() = subscribeOn(BasePresenter.subscribeScheduler).observeOn(BasePresenter.observeScheduler)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/RxExtensions.kt:17:1Line detected, which is longer than the defined maximum line length in the code style.
14 fun <T> Single<T>.withBackgroundSchedulers() = subscribeOn(BasePresenter.subscribeScheduler).observeOn(BasePresenter.subscribeScheduler)
15 fun <T> Single<T>.withDefaultSchedulers() = subscribeOn(BasePresenter.subscribeScheduler).observeOn(BasePresenter.observeScheduler)
16 fun Completable.withDefaultSchedulers() = subscribeOn(BasePresenter.subscribeScheduler).observeOn(BasePresenter.observeScheduler)
17 fun Completable.withBackgroundSchedulers() = subscribeOn(BasePresenter.subscribeScheduler).observeOn(BasePresenter.subscribeScheduler)
18 fun <T> Observable<T>.withDefaultSchedulers() = subscribeOn(BasePresenter.subscribeScheduler).observeOn(BasePresenter.observeScheduler)
19 fun <T> Flowable<T>.withDefaultSchedulers() = subscribeOn(BasePresenter.subscribeScheduler).observeOn(BasePresenter.observeScheduler)
20 fun <T> Single<T>.zipWithCompletable(other: Completable, zipper: BiFunction<in T, in String, out T>) = zipWith(other.toSingleDefault(""), zipper)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/RxExtensions.kt:18:1Line detected, which is longer than the defined maximum line length in the code style.
15 fun <T> Single<T>.withDefaultSchedulers() = subscribeOn(BasePresenter.subscribeScheduler).observeOn(BasePresenter.observeScheduler)
16 fun Completable.withDefaultSchedulers() = subscribeOn(BasePresenter.subscribeScheduler).observeOn(BasePresenter.observeScheduler)
17 fun Completable.withBackgroundSchedulers() = subscribeOn(BasePresenter.subscribeScheduler).observeOn(BasePresenter.subscribeScheduler)
18 fun <T> Observable<T>.withDefaultSchedulers() = subscribeOn(BasePresenter.subscribeScheduler).observeOn(BasePresenter.observeScheduler)
19 fun <T> Flowable<T>.withDefaultSchedulers() = subscribeOn(BasePresenter.subscribeScheduler).observeOn(BasePresenter.observeScheduler)
20 fun <T> Single<T>.zipWithCompletable(other: Completable, zipper: BiFunction<in T, in String, out T>) = zipWith(other.toSingleDefault(""), zipper)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/RxExtensions.kt:19:1Line detected, which is longer than the defined maximum line length in the code style.
16 fun Completable.withDefaultSchedulers() = subscribeOn(BasePresenter.subscribeScheduler).observeOn(BasePresenter.observeScheduler)
17 fun Completable.withBackgroundSchedulers() = subscribeOn(BasePresenter.subscribeScheduler).observeOn(BasePresenter.subscribeScheduler)
18 fun <T> Observable<T>.withDefaultSchedulers() = subscribeOn(BasePresenter.subscribeScheduler).observeOn(BasePresenter.observeScheduler)
19 fun <T> Flowable<T>.withDefaultSchedulers() = subscribeOn(BasePresenter.subscribeScheduler).observeOn(BasePresenter.observeScheduler)
20 fun <T> Single<T>.zipWithCompletable(other: Completable, zipper: BiFunction<in T, in String, out T>) = zipWith(other.toSingleDefault(""), zipper)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/RxExtensions.kt:20:1Line detected, which is longer than the defined maximum line length in the code style.
17 fun Completable.withBackgroundSchedulers() = subscribeOn(BasePresenter.subscribeScheduler).observeOn(BasePresenter.subscribeScheduler)
18 fun <T> Observable<T>.withDefaultSchedulers() = subscribeOn(BasePresenter.subscribeScheduler).observeOn(BasePresenter.observeScheduler)
19 fun <T> Flowable<T>.withDefaultSchedulers() = subscribeOn(BasePresenter.subscribeScheduler).observeOn(BasePresenter.observeScheduler)
20 fun <T> Single<T>.zipWithCompletable(other: Completable, zipper: BiFunction<in T, in String, out T>) = zipWith(other.toSingleDefault(""), zipper)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/TextViewLinksImprover.kt:73:9Line detected, which is longer than the defined maximum line length in the code style.
70 highlightColor = Color.TRANSPARENT
71 setText(SpannableString(start + url + end).apply {
72 setSpan(CustomClickSpan(onClickUrl), start.length, (start + url).length, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
73 setSpan(ForegroundColorSpan(getColor(urlColor)), start.length, (start + url).length, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
74 }, TextView.BufferType.SPANNABLE)
75 }
76
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/ThemeUtil.kt:38:5Line detected, which is longer than the defined maximum line length in the code style.
35 userUtils.putAppthemeToPref(t.theme)
36 }
37
38 fun retrieveTheme():ThemeOption = ThemeOption.fromString(PreferenceStore.getUserSettingsTheme()?.data?.get(UserSettingsService.SettingsType.THEME_SETTING.typeName)?.toString())
39
40
41 fun convertString(themeOption: String?):Pair<Int,ThemeOption> = when (themeOption) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/analytics/AnalyticsCore.kt:19:2Line detected, which is longer than the defined maximum line length in the code style.
16 import java.io.IOException
17
18 /**
19 * The core class for tracking both 'action' and 'pageView' events in the app. See [action] and [pageView] for more details.
20 * There is some desctiption here also: https://github.com/Sharecare/feingoldtech-android-sharecare/wiki/Analytics-API
21 */
22 @Utility(msg = "The core class for tracking both 'action' and 'pageView' events in the app.", type = UtilityType.Analytics)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/analytics/AnalyticsCore.kt:22:1Line detected, which is longer than the defined maximum line length in the code style.
19 * The core class for tracking both 'action' and 'pageView' events in the app. See [action] and [pageView] for more details.
20 * There is some desctiption here also: https://github.com/Sharecare/feingoldtech-android-sharecare/wiki/Analytics-API
21 */
22 @Utility(msg = "The core class for tracking both 'action' and 'pageView' events in the app.", type = UtilityType.Analytics)
23 object AnalyticsCore {
24
25 private var eventTracker: EventTracker? = null
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/analytics/GeneralAnalytics.kt:11:1Line detected, which is longer than the defined maximum line length in the code style.
8 /**
9 * A common place for most of predefined keys and values for analytic events.
10 */
11 @CoreComponent(msg = "A commonplace for most predefined keys and values for analytic events", type = ComponentType.Configuration)
12 object GeneralAnalytics {
13 const val SHARE_EMAIL = "Email"
14 const val DEFAULT_STATE_VALUE = "1"
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/analytics/GeneralSearchAnalytics.kt:10:5Line detected, which is longer than the defined maximum line length in the code style.
7
8 @JvmStatic
9 @JvmOverloads
10 fun reportSearchAction(searchTypeActionName: String = SEARCH_ACTION, searchType: SearchType, searchWord: String, searchContent: SearchContent): ActionEvent {
11 return AnalyticsCore.action(searchTypeActionName)
12 .customParam(GeneralAnalytics.State.SEARCH_TYPE, searchType.stringValue)
13 .customParam(GeneralAnalytics.State.SEARCH_KEY_WORD, searchWord)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/analytics/description/AppDescriptionLogger.kt:82:13Line detected, which is longer than the defined maximum line length in the code style.
79
80 private fun tryInstallLifecycleLoggerOfFragments(activity: Activity) {
81 if (activity is FragmentActivity) {
82 activity.supportFragmentManager.registerFragmentLifecycleCallbacks(object : FragmentManager.FragmentLifecycleCallbacks() {
83 override fun onFragmentStopped(fm: FragmentManager, f: Fragment) {
84 logOnStopped(f)
85 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/analytics/event/ActionEvent.kt:17:2Line detected, which is longer than the defined maximum line length in the code style.
14 import com.sharecare.realgreen.core.util.convertValueToString
15
16 /**
17 * Class that represents an 'action' analytic event. Do not construct it manually, use [AnalyticsCore]'s action() method.
18 */
19 @Utility(msg = "Class that represents 'action' analytic event", type = UtilityType.Event)
20 class ActionEvent(private val name: String) : TrackingEvent() {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/analytics/event/DefaultAnalyticsParams.kt:23:9Line detected, which is longer than the defined maximum line length in the code style.
20 object DefaultAnalyticsParams {
21 fun addParams(map: MutableMap<String, Any>) {
22 val ticket = PreferenceStore.getTicketSetting()
23 map[DefaultParams.LOGIN_STATUS] = if (Session.isSignIn()) DefaultValues.AUTHENTICATED else DefaultValues.UNAUTHENTICATED
24 map[DefaultParams.PLATFORM] = DefaultValues.PLATFORM_ANDROID
25 map[DefaultParams.KOCHAVA_DEVICE_ID] = PreferenceStore.getDeviceId().toString()
26 map[DefaultParams.ADVERTISING_ID] = PreferenceStore.getAdvertisingId().toString()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/analytics/event/DefaultAnalyticsParams.kt:34:13Line detected, which is longer than the defined maximum line length in the code style.
31
32 val realAgeStatus = PreferenceStore.getRealAgeStatusSetting()
33
34 map[DefaultParams.RAT_COMPLETED] = if (realAgeStatus?.isCompleted == true) DefaultValues.YES else DefaultValues.NO
35 map[DefaultParams.USER_TYPE] = if (PreferenceStore.isExistingUser()) DefaultValues.EXISTING else DefaultValues.NEW
36 map[DefaultParams.SEGMENT] = DefaultValues.NONE
37 map[DefaultParams.CONTENT] = PreferenceStore.isReceivingContentSetting().toString()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/analytics/event/DefaultAnalyticsParams.kt:35:13Line detected, which is longer than the defined maximum line length in the code style.
32 val realAgeStatus = PreferenceStore.getRealAgeStatusSetting()
33
34 map[DefaultParams.RAT_COMPLETED] = if (realAgeStatus?.isCompleted == true) DefaultValues.YES else DefaultValues.NO
35 map[DefaultParams.USER_TYPE] = if (PreferenceStore.isExistingUser()) DefaultValues.EXISTING else DefaultValues.NEW
36 map[DefaultParams.SEGMENT] = DefaultValues.NONE
37 map[DefaultParams.CONTENT] = PreferenceStore.isReceivingContentSetting().toString()
38 map[DefaultParams.LOCATION] = PreferenceStore.isReportingLocationSetting().toString()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/analytics/event/EventTracker.kt:17:1Line detected, which is longer than the defined maximum line length in the code style.
14 * Class that actually sends events to the backend.
15 */
16 @CoreComponent(msg = "Class that actually send an event to the server", type = ComponentType.Analytics)
17 class EventTracker(params: GlobalParams = GlobalParams::class.inject(), logger: Logger = params.androidLogger()) : Logger by logger {
18 private val handler = InnerHandler(this)
19
20 fun enqueue(event: TrackingEvent) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/analytics/event/PageViewEvent.kt:12:2Line detected, which is longer than the defined maximum line length in the code style.
9 import com.sharecare.realgreen.core.util.convertValueToString
10
11 /**
12 * Class that represents an 'pageView' analytic event. Do not construct it manually, use [AnalyticsCore]'s pageView() method.
13 */
14 @CoreComponent(msg = "Class that represents 'pageview' analytic event", type = ComponentType.Analytics)
15 class PageViewEvent(private val name: String) : TrackingEvent() {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/analytics/event/TrackingEvent.kt:23:5Line detected, which is longer than the defined maximum line length in the code style.
20 return this
21 }
22
23 /*
24 * ConcurrentHashMap class is thread-safe i.e. multiple threads can operate on a single object without any complications
25 */
26 protected fun getAllParams() = ConcurrentHashMap<String, Any>().apply {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/analytics/event/TrackingEvent.kt:31:5Line detected, which is longer than the defined maximum line length in the code style.
28 putAll(customParameters)
29 }
30
31 /*
32 * Returning only customParams from event, method is use only for debug purpose to skip all analytics params which are not relevant.
33 * */
34 protected fun getCustomParamsOnly() = customParameters
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/analytics/feed/FeedItemAnalytics.kt:43:5Line detected, which is longer than the defined maximum line length in the code style.
40 reportAction(action, FeedItemAnalyticsInfo.create(itemRecord, cardPosition))
41
42 @JvmStatic
43 fun reportAction(action: String, cardPosition: Int, groupId: String?, feedItemId: String?, templateAnalyticsList: List<TemplateAnalytics>) =
44 reportAction(action, FeedItemAnalyticsInfo.create(cardPosition, groupId,
45 feedItemId, templateAnalyticsList))
46
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/analytics/feed/FeedItemAnalytics.kt:67:5Line detected, which is longer than the defined maximum line length in the code style.
64 }
65
66 @JvmStatic
67 fun reportItemPinAction(pinned: Boolean, viewHolder: FeedViewHolder, templateAnalyticsList: List<TemplateAnalytics>) {
68 reportAction(Actions.PIN, viewHolder.index + 1, viewHolder.itemRecord.groupId,
69 viewHolder.itemRecord.serverId, templateAnalyticsList)
70 .customParam(Parameters.PIN, if (pinned)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/analytics/feed/FeedItemAnalytics.kt:86:5Line detected, which is longer than the defined maximum line length in the code style.
83 reportAction(Actions.CLICK_CARD, viewHolder)
84
85 @JvmStatic
86 fun reportClickCardAction(cardPosition: Int, groupId: String?, feedItemId: String?, templateAnalyticsList: List<TemplateAnalytics>) =
87 reportAction(Actions.CLICK_CARD, cardPosition, groupId,
88 feedItemId, templateAnalyticsList)
89
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/analytics/feed/FeedItemAnalytics.kt:99:5Line detected, which is longer than the defined maximum line length in the code style.
96 reportAction(Actions.EVENT_CARD, viewHolder)
97
98 @JvmStatic
99 fun reportCardInteractionAction(cardPosition: Int, groupId: String?, feedItemId: String?, templateAnalyticsList: List<TemplateAnalytics>) =
100 reportAction(Actions.EVENT_CARD, cardPosition, groupId,
101 feedItemId, templateAnalyticsList)
102
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/analytics/feed/FeedItemAnalytics.kt:104:5Line detected, which is longer than the defined maximum line length in the code style.
101 feedItemId, templateAnalyticsList)
102
103 @JvmStatic
104 fun reportCtaAction(viewHolder: FeedViewHolder, templateAnalyticsList: List<TemplateAnalytics>, rootAnalytics: List<TemplateAnalytics>? = null) {
105 reportAction(Actions.CTA, viewHolder.index + 1, viewHolder.itemRecord.groupId,
106 viewHolder.itemRecord.serverId, rootAnalytics ?: templateAnalyticsList)
107 .feedItemCta(FeedItemAnalyticsCta.create(templateAnalyticsList))
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/analytics/feed/FeedItemAnalytics.kt:111:5Line detected, which is longer than the defined maximum line length in the code style.
108 }
109
110 @JvmStatic
111 fun reportCtaAction(cardPosition: Int, groupId: String?, feedItemId: String?, templateAnalyticsList: List<TemplateAnalytics>, rootAnalytics: List<TemplateAnalytics>? = null) {
112 reportAction(Actions.CTA, cardPosition, groupId,
113 feedItemId, rootAnalytics ?: templateAnalyticsList)
114 .feedItemCta(FeedItemAnalyticsCta.create(templateAnalyticsList))
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/analytics/feed/FeedItemAnalytics.kt:139:9Line detected, which is longer than the defined maximum line length in the code style.
136
137 @JvmStatic
138 fun reportInteractionAction(viewHolder: FeedViewHolder, title: String) {
139 reportCardInteractionAction(FeedItemAnalyticsInfo.create(viewHolder.itemRecord, viewHolder.adapterPosition + 1).apply {
140 cardDetail = title
141 })
142 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/analytics/feed/FeedItemAnalytics.kt:145:5Line detected, which is longer than the defined maximum line length in the code style.
142 }
143
144 @JvmStatic
145 fun reportShareAction(viewHolder: FeedViewHolder, shareType: String, templateAnalyticsList: List<TemplateAnalytics>) {
146 reportShareAction(FeedItemAnalyticsInfo.create(viewHolder.index + 1, viewHolder.itemRecord.groupId,
147 viewHolder.itemRecord.serverId, templateAnalyticsList), shareType)
148 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/analytics/feed/FeedItemAnalytics.kt:151:5Line detected, which is longer than the defined maximum line length in the code style.
148 }
149
150 @JvmStatic
151 fun reportShareAction(cardPosition: Int, groupId: String?, feedItemId: String?, shareType: String, templateAnalyticsList: List<TemplateAnalytics>) {
152 reportShareAction(FeedItemAnalyticsInfo.create(cardPosition, groupId,
153 feedItemId, templateAnalyticsList), shareType)
154 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/analytics/feed/FeedItemAnalytics.kt:158:9Line detected, which is longer than the defined maximum line length in the code style.
155
156 @JvmStatic
157 fun reportShareAction(viewHolder: FeedViewHolder, shareType: String) {
158 reportShareAction(FeedItemAnalyticsInfo.create(viewHolder.itemRecord, viewHolder.adapterPosition + 1), shareType)
159 }
160
161 @JvmStatic
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/analytics/feed/FeedItemAnalyticsInfo.kt:99:9Line detected, which is longer than the defined maximum line length in the code style.
96 viewHolder.adapterPosition + 1
97 )
98
99 fun create(cardPosition: Int?, groupId: String?, feedItemId: String?, templateAnalyticsList: List<TemplateAnalytics>) =
100 FeedItemAnalyticsInfo(
101 templateAnalyticsList.get(0).data!!.get(CARD_TYPE, NONE),
102 templateAnalyticsList.get(0).data!!.get(CARD_DETAIL, NONE),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/analytics/feed/FeedItemAnalyticsInfo.kt:186:25Line detected, which is longer than the defined maximum line length in the code style.
183 fun cardDetailByItemRecord(record: ItemRecord) =
184 when (ItemType.getType(record.itemType)) {
185 ItemType.QUESTION -> record.getValueInDataOrNone<YesNoQuestionItemRecordData> {
186 // 'question' field corresponds to 'description' field of the original data model, so it should be used in analytics
187 question
188 }
189 ItemType.VIDEO -> record.getValueInDataOrNone<VideoItemRecordData> { title }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/analytics/feed/FeedItemImpressionAnalyticsInfo.kt:63:9Line detected, which is longer than the defined maximum line length in the code style.
60 )
61
62 @JvmStatic
63 fun createContentImpressionAnalytics(contentImpression: ContentImpression, position: Int) = FeedItemImpressionAnalyticsInfo(
64 contentImpression.cardType ?: NONE,
65 contentImpression.title ?: NONE,
66 position,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/analytics/feed/FeedItemImpressionAnalyticsInfo.kt:77:25Line detected, which is longer than the defined maximum line length in the code style.
74 templateAnalyticsList.get(0).data!!.get(FeedItemAnalyticsInfo.CARD_DETAIL, NONE),
75 viewHolder.index + 1,
76 templateAnalyticsList.get(0).data!!.get(FeedItemAnalyticsInfo.SOURCE_TYPE, NONE),
77 templateAnalyticsList.get(0).data!!.get(FeedItemAnalyticsInfo.CARD_OWNER)?.getNullIfEmptyString() ?: NONE,
78 templateAnalyticsList.get(0).data!!.get(FeedItemAnalyticsInfo.SOURCE_TITLE, NONE),
79 contentId = viewHolder.itemRecord.contentId ?: NONE,
80 groupId = viewHolder.itemRecord.groupId ?: NONE,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/analytics/feed/ImpressionTracker.kt:21:2Line detected, which is longer than the defined maximum line length in the code style.
18 *
19 * Impression is valid if view has been inView for mare than time duration[IMPRESSION_TRIGGER_MIN_DURATION_MILLIS].
20 *
21 * reports impressions to the analytics service, when cards (go out of the view or action occurs on the view) and satisfy the
22 * minimum time duration[IMPRESSION_TRIGGER_MIN_DURATION_MILLIS].
23 *
24 * ImpressionTracker is lifecycle aware to [Lifecycle.Event.ON_RESUME] and [Lifecycle.Event.ON_PAUSE] events
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/analytics/feed/ImpressionTracker.kt:53:5Line detected, which is longer than the defined maximum line length in the code style.
50 // track recyclerview items for inView Impressions
51 fun trackRecyclerView(recyclerView: RecyclerView)
52
53 // reports impression to analytics if it satisfies the minimum time duration [IMPRESSION_TRIGGER_MIN_DURATION_MILLIS].
54 fun reportToImpressionAnalytics(impression: Impression)
55 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/analytics/feed/ImpressionTrackerImpl.kt:60:17Line detected, which is longer than the defined maximum line length in the code style.
57 if (impressionActionEvent.impressionActionEventType.shouldTrackAfterReport()) {
58 engagedImpression.startTime = System.currentTimeMillis()
59 trackingImpressions.add(engagedImpression)
60 L.i(IMPRESSION_TRACKER_TAG, "Impression START - cardType : ${engagedImpression.impressionAnalyticsInfo.cardType}" +
61 " - ${engagedImpression.identifier()}")
62 }
63 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/analytics/feed/ImpressionTrackerImpl.kt:94:13Line detected, which is longer than the defined maximum line length in the code style.
91 if (duration >= ImpressionTracker.IMPRESSION_TRIGGER_MIN_DURATION_MILLIS) {
92 val feedItemAnalyticsInfo = impression.addDurationToAnalyticsInfo(duration)
93
94 FeedItemImpressionAnalyticsInfo.reportAction(GeneralAnalytics.Action.CARD_IMPRESSION, feedItemAnalyticsInfo).apply {
95 if (feedItemAnalyticsInfo.groupPosition != null) customParam(FeedItemAnalyticsInfo.GROUP_POSITION, feedItemAnalyticsInfo.groupPosition)
96 }
97 L.i(IMPRESSION_TRACKER_TAG, "Impression RECORDED - cardType : ${feedItemAnalyticsInfo.cardType}" +
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/analytics/feed/ImpressionTrackerImpl.kt:95:17Line detected, which is longer than the defined maximum line length in the code style.
92 val feedItemAnalyticsInfo = impression.addDurationToAnalyticsInfo(duration)
93
94 FeedItemImpressionAnalyticsInfo.reportAction(GeneralAnalytics.Action.CARD_IMPRESSION, feedItemAnalyticsInfo).apply {
95 if (feedItemAnalyticsInfo.groupPosition != null) customParam(FeedItemAnalyticsInfo.GROUP_POSITION, feedItemAnalyticsInfo.groupPosition)
96 }
97 L.i(IMPRESSION_TRACKER_TAG, "Impression RECORDED - cardType : ${feedItemAnalyticsInfo.cardType}" +
98 " - ${impression.identifier()} - duration : $duration")
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/analytics/feed/ImpressionTrackerImpl.kt:121:29Line detected, which is longer than the defined maximum line length in the code style.
118 .addOnGlobalLayoutListener {
119 if (!firstTrackFlag) {
120 (recyclerView.layoutManager as LinearLayoutManager?)?.run {
121 analyzeAndTrackViewData(recyclerView, this@ImpressionTrackerImpl, findFirstVisibleItemPosition(),
122 findLastVisibleItemPosition())
123 }
124 firstTrackFlag = true
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/analytics/feed/ImpressionTrackerImpl.kt:159:25Line detected, which is longer than the defined maximum line length in the code style.
156 (recyclerView.layoutManager as LinearLayoutManager).orientation)
157 if (percentageVisible >= ImpressionTracker.IMPRESSION_TRIGGER_MIN_VIEW_PERCENTAGE) {
158 if (viewHolder.isTrackingImpressions) {
159 if (ImpressionType.FEED == impressionTrackerImpl.impressionType && viewHolder.itemRecord.isValid) {
160 inViewImpressions.add(Impression(currentTime,
161 viewPosition,
162 viewHolder.itemRecord.serverId,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/analytics/feed/ImpressionTrackerImpl.kt:165:45Line detected, which is longer than the defined maximum line length in the code style.
162 viewHolder.itemRecord.serverId,
163 if (!viewHolder.analytics.isNullOrEmpty()) {
164 FeedItemImpressionAnalyticsInfo.create(viewHolder, viewHolder.analytics).apply {
165 if (viewHolder.groupViewPosition != null) groupPosition = viewHolder.getItemPosition()
166 }
167 } else {
168 FeedItemImpressionAnalyticsInfo.createImpressionAnalytics(viewHolder.itemRecord, viewPosition).apply {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/analytics/feed/ImpressionTrackerImpl.kt:168:41Line detected, which is longer than the defined maximum line length in the code style.
165 if (viewHolder.groupViewPosition != null) groupPosition = viewHolder.getItemPosition()
166 }
167 } else {
168 FeedItemImpressionAnalyticsInfo.createImpressionAnalytics(viewHolder.itemRecord, viewPosition).apply {
169 if (viewHolder.groupViewPosition != null) groupPosition = viewHolder.getItemPosition()
170 }
171 }))
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/analytics/feed/ImpressionTrackerImpl.kt:169:45Line detected, which is longer than the defined maximum line length in the code style.
166 }
167 } else {
168 FeedItemImpressionAnalyticsInfo.createImpressionAnalytics(viewHolder.itemRecord, viewPosition).apply {
169 if (viewHolder.groupViewPosition != null) groupPosition = viewHolder.getItemPosition()
170 }
171 }))
172 } else if (ImpressionType.CONTENT == impressionTrackerImpl.impressionType
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/batterysaver/BatterySaverModeWatcher.kt:5:1Line detected, which is longer than the defined maximum line length in the code style.
2
3 import android.content.Context
4
5 abstract class BatterySaverModeWatcher internal constructor(protected val context: Context, private val listener: Listener) {
6
7 private var isLoggedIn = false
8 private var resumed = false
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/data/OfflineListWrapper.kt:18:5Line detected, which is longer than the defined maximum line length in the code style.
15
16 override var listeners = Listeners<SomethingChangeListener<T>>()
17
18 private val realmResultListener = OrderedRealmCollectionChangeListener<RealmResults<T>> { newCollection, changeSet: OrderedCollectionChangeSet? ->
19 val prevResults = results
20 results = newCollection
21 listeners.forEach { it.onSomethingChanged(prevResults, newCollection, changeSet) }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/imageloader/ImageLoader.kt:32:5Line detected, which is longer than the defined maximum line length in the code style.
29 private const val PLATFORM_PLACEHOLDER = "{{platform}}"
30 private const val ANDROID = "android"
31 private const val SCHEME_HTTP = "http:"
32 private const val CLOUDINARY_REGEX = "^(https?:\\/\\/res\\.cloudinary\\.com\\/(?:[^/]+\\/){3}(?:(?:[^_/]+_[^,/]+,?)*\\/)?)(.+)\$"
33
34
35 enum class Transformation {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/imageloader/ImageLoader.kt:101:5Line detected, which is longer than the defined maximum line length in the code style.
98 setImageUrl(view, url, 0, 0, Transformation.NONE, picassoImageScale)
99 }
100
101 fun setImageUrl(view: LoadDestination, url: String?, picassoImageScale: PicassoImageScale, rotationMode: RotationMode) {
102 setImageUrl(view, url, 0, 0, Transformation.NONE, picassoImageScale, rotationMode)
103 }
104
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/imageloader/ImageLoader.kt:106:5Line detected, which is longer than the defined maximum line length in the code style.
103 }
104
105 @JvmStatic
106 fun setImageUrl(view: LoadDestination, url: String?, transformation: Transformation, picassoImageScale: PicassoImageScale) {
107 setImageUrl(view, url, 0, 0, transformation, picassoImageScale)
108 }
109
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/imageloader/ImageLoader.kt:110:5Line detected, which is longer than the defined maximum line length in the code style.
107 setImageUrl(view, url, 0, 0, transformation, picassoImageScale)
108 }
109
110 fun setImageUrl(view: LoadDestination, url: String?, transformation: Transformation, picassoImageScale: PicassoImageScale, rotationMode: RotationMode) {
111 setImageUrl(view, url, 0, 0, transformation, picassoImageScale, rotationMode)
112 }
113
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/imageloader/ImageLoader.kt:194:21Line detected, which is longer than the defined maximum line length in the code style.
191 if (transformation != null) {
192 when (transformation) {
193 Transformation.CIRCLE -> requestCreator.transform(CircleTransformation())
194 Transformation.CIRCLE_STROKE -> requestCreator.transform(CircleTransformation(CircleTransformation.Stroke.STROKED))
195 }
196 }
197 if (picassoImageScale == null || picassoImageScale != PicassoImageScale.NO_SCALING) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/imageloader/ImageLoader.kt:236:5Line detected, which is longer than the defined maximum line length in the code style.
233 private var isInitialized = false
234
235 @JvmStatic
236 fun init(context: Context, sizeOfDiskCacheInMb: Long = 16, showCacheIndicatorOverlay: Boolean = false, doVerboseLogging: Boolean = false) {
237 this.sizeOfDiskCacheInMb = sizeOfDiskCacheInMb
238 this.showCacheIndicatorOverlay = showCacheIndicatorOverlay
239 this.doVerboseLogging = doVerboseLogging
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/imageloader/ImageLoader.kt:269:1Line detected, which is longer than the defined maximum line length in the code style.
266 }
267 }
268
269 fun buildPicassoInstance(context: Context, showCacheIndicatorOverlay: Boolean, doVerboseLogging: Boolean, diskCache: Cache?, baerer: String? = null): Picasso? {
270 val client = OkHttpClient
271 .Builder().apply {
272
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/imageloader/LoadDestination.kt:17:9Line detected, which is longer than the defined maximum line length in the code style.
14 fun wrap(imageView: ImageView) = ImageViewDestination(imageView)
15
16 @JvmStatic
17 fun wrap(target: Target, context: Context, @DimenRes sideSizeRes: Int) = TargetDestination(target, context, sideSizeRes)
18
19 fun wrap(target: Target, context: Context) = TargetDestination(target, context, null)
20 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/link/FeatureLinkParser.kt:8:2Line detected, which is longer than the defined maximum line length in the code style.
5 import com.sharecare.realgreen.core.tool.annotations.CoreComponent
6
7 /**
8 * Base class for [LinkParser]s that first should check if a specific feature is actually available in user's configuraiton.
9 */
10 @CoreComponent(msg = """The base class for [LinkParser]s that first should check if a specific feature
11 |is actually available in the user's configuration.""", type = ComponentType.Configuration)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/link/LinkParser.kt:7:2Line detected, which is longer than the defined maximum line length in the code style.
4 import com.sharecare.realgreen.core.tool.annotations.CoreComponent
5
6 /**
7 * And interface to be implemented by a feature-specific logic for checking a String deeplink to represent a particular destination in the app.
8 * The result may be not only of a single class of [DeepLinkDestination].
9 */
10 @CoreComponent(msg = """And interface to be implemented by a feature-specific logic for checking a String deep-link
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/link/LinkParser.kt:11:1Line detected, which is longer than the defined maximum line length in the code style.
8 * The result may be not only of a single class of [DeepLinkDestination].
9 */
10 @CoreComponent(msg = """And interface to be implemented by a feature-specific logic for checking a String deep-link
11 |to represent a particular destination in the app. The result may be not only of a single class of DeepLinkDestination.""",
12 type = ComponentType.DeepLink)
13 interface LinkParser {
14
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/link/Utils.kt:31:1Line detected, which is longer than the defined maximum line length in the code style.
28 }.toMap())
29 }
30
31 /** As [queryCurrentFullRootUrl] has dependency with the current configuration, we are checking for configurations first.
32 * If we don't have configurations, we are considering as [url] is not for Current Environment.
33 */
34 fun isUrlNotInTheCurrentEnvironmentDomain(url: String): Boolean {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/link/Utils.kt:43:1Line detected, which is longer than the defined maximum line length in the code style.
40 return true
41 }
42
43 fun completeRelativeUrl(url: String, networkConfigurationType: NetworkConfigurationType = NetworkConfigurationType.WEBAPP): String {
44 return if (url.startsWith("/")) {
45 val host = queryFullUrl(networkConfigurationType)
46 "${host}${url}"
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/localization/DateLocalizer.kt:49:13Line detected, which is longer than the defined maximum line length in the code style.
46
47 @JvmStatic
48 fun tryParseDate(formatted: String, style: DateStyle): Date {
49 return DateFormat.getDateInstance(style.intConstant, LocaleCoreUtil.getSupportedJavaLocale()).parse(formatted)
50 }
51
52 @JvmStatic
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/localization/LocaleCoreManager.kt:34:13Line detected, which is longer than the defined maximum line length in the code style.
31 val configuration = ConfigurationManager().getConfiguration()
32 if (localeResponse.locale != null) {
33 val supportedLocale = localeResponse.locale!!.split(",")?.toTypedArray()?.first()
34 configuration.getSupportedLocales().first { it.locale.equals(supportedLocale) }.let { PreferenceStore.setLocaleKey(it) }
35 }
36 }
37
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/localization/LocaleCoreManager.kt:51:13Line detected, which is longer than the defined maximum line length in the code style.
48 } else {
49 @Suppress("DEPRECATION")
50 context.applicationContext.resources.configuration.locale = Locale(language, country)
51 context.applicationContext.resources.updateConfiguration(context.resources.configuration, context.resources.displayMetrics)
52 }
53 GlobalContext.get().declare(context, named(GlobalKoins.LocalizedContext), allowOverride = true)
54 return context
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/localization/LocaleCoreManager.kt:66:13Line detected, which is longer than the defined maximum line length in the code style.
63 setLocale(context, PreferenceStore.getLocaleKey()!!.getLanguageCode(),
64 PreferenceStore.getLocaleKey()!!.getRegionCode()!!)
65 } else {
66 setLocale(context, LocaleCoreUtil.getSupportedJavaLocale().language, LocaleCoreUtil.getSupportedJavaLocale().country)
67 }
68 }
69
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/localization/LocaleCoreUtil.kt:40:128Line detected, which is longer than the defined maximum line length in the code style.
37 }
38
39 /* Method is returning SupportedLocale type which is used to send as a part of header in all our requests,
40 also this type we are receiving from the server as a part of configuration. Returned locale depend on the device locale */
41 @Nullable
42 @JvmStatic
43 fun getSupportedLocaleBasedOnAppLocale(): SupportedLocale? {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/notification/NotificationCoreUtils.kt:65:9Line detected, which is longer than the defined maximum line length in the code style.
62
63 val manager = context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
64 val channelDesc = context.getString(NotificationChannels.GENERAL_CHANNEL.resDesc)
65 val channel = NotificationChannel(NotificationChannels.GENERAL_CHANNEL.channelName, channelDesc, NotificationManager.IMPORTANCE_DEFAULT)
66 if (manager.getNotificationChannel(NotificationChannels.GENERAL_CHANNEL.channelName) == null) {
67 manager.createNotificationChannel(channel)
68 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/notification/NotificationCoreUtils.kt:85:5Line detected, which is longer than the defined maximum line length in the code style.
82 }
83
84 @JvmStatic
85 fun getNotificationBuilder(context: Context, notificationChannel: NotificationCoreUtils.NotificationChannels): NotificationCompat.Builder {
86 val notificationBuilder = NotificationCompat.Builder(context, notificationChannel.channelName)
87 notificationBuilder.priority = NotificationCompat.PRIORITY_HIGH
88 notificationBuilder.setSmallIcon(R.drawable.sc3_notification_new)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/notification/NotificationCoreUtils.kt:102:13Line detected, which is longer than the defined maximum line length in the code style.
99 notification.flags = notification.flags or Notification.FLAG_AUTO_CANCEL
100 val notificationManager = context.notificationService
101 if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
102 var notificationChannel: NotificationChannel? = notificationManager.getNotificationChannel(notification.channelId)
103 if (notificationChannel == null) {
104 val channelDesc = context.getString(NotificationCoreUtils.NotificationChannels.getDescByChannelId(notification.channelId))
105 notificationChannel = NotificationChannel(notification.channelId,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/notification/NotificationCoreUtils.kt:104:17Line detected, which is longer than the defined maximum line length in the code style.
101 if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
102 var notificationChannel: NotificationChannel? = notificationManager.getNotificationChannel(notification.channelId)
103 if (notificationChannel == null) {
104 val channelDesc = context.getString(NotificationCoreUtils.NotificationChannels.getDescByChannelId(notification.channelId))
105 notificationChannel = NotificationChannel(notification.channelId,
106 channelDesc,
107 NotificationManager.IMPORTANCE_HIGH)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/notification/NotificationCoreUtils.kt:179:9Line detected, which is longer than the defined maximum line length in the code style.
176 if (!Strings.isNullOrEmpty(dataUriString)) {
177 intent.data = Uri.parse(dataUriString)
178 }
179 return PendingIntent.getActivity(context, id, intent, PendingIntent.FLAG_CANCEL_CURRENT or PendingIntent.FLAG_IMMUTABLE)
180 }
181
182 fun cancel(context: Context, id: Int) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/permission/PermissionsUtil.kt:267:9Line detected, which is longer than the defined maximum line length in the code style.
264
265 /*This list we check after login and display explonation on the GDTPermissionsActivity*/
266 @RequiresApi(Build.VERSION_CODES.Q)
267 INIT_LIST_OF_PERMISSIONS_MAX(*STEPS.permissionNames, *GDPR.permissionNames, *STRESS_ALL.permissionNames, *CAMERA.permissionNames),
268
269 /*This list we check after login and display explonation on the GDTPermissionsActivity*/
270 @RequiresApi(Build.VERSION_CODES.Q)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/permission/PermissionsUtil.kt:271:9Line detected, which is longer than the defined maximum line length in the code style.
268
269 /*This list we check after login and display explonation on the GDTPermissionsActivity*/
270 @RequiresApi(Build.VERSION_CODES.Q)
271 INIT_LIST_OF_PERMISSIONS_MIN(*STEPS.permissionNames, *GDPR.permissionNames, *STRESS_MINIMUM.permissionNames, *CAMERA.permissionNames),
272
273 HEALTH_PROFILE(Manifest.permission.CAMERA)
274
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/phr/PHRMedicationUtil.kt:31:31Line detected, which is longer than the defined maximum line length in the code style.
28
29 @JvmStatic
30 fun findMatchedInfosheets(parentCode: HPMedicationCode,
31 infosheetsResults: List<CIMedicationInfosheetResult>?) = infosheetsResults?.firstOrNull { infosheetResult ->
32 parentCode.same(infosheetResult.result.matchCode)
33 }?.result?.sections
34
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/phr/PHRMedicationUtil.kt:46:36Line detected, which is longer than the defined maximum line length in the code style.
43 imagesResults: List<CIMedicationImageResult>?,
44 infosheetsResults: List<CIMedicationInfosheetResult>?,
45 doseFormStrengthsResults: List<CIMedicationDetailDoseFormStrengthsResult>?,
46 medicationsResults: List<HPMedicationResult>) = arrayListOf<HPMedicationSection>().also { medicationsSections ->
47 detailsResults.forEach {
48 medicationsSections.add(HPMedicationSection(
49 findMatchedHpRecord(it.result.matchCode, medicationsResults),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/phr/PHRMedicationUtil.kt:58:5Line detected, which is longer than the defined maximum line length in the code style.
55 }
56
57 @JvmStatic
58 fun getCIMedicationForm(ciMedicationDetailDoseFormStrengthsData: List<CIMedicationForm>?, form: String?): CIMedicationForm? =
59 ciMedicationDetailDoseFormStrengthsData?.firstOrNull {
60 it.form.equals(form, true)
61 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/phr/PHRMedicationUtil.kt:64:5Line detected, which is longer than the defined maximum line length in the code style.
61 }
62
63 @JvmStatic
64 fun getCIMedicationStrength(ciMedicationForm: CIMedicationForm?, medicationSection: HPMedicationSection) = ciMedicationForm?.strengths?.firstOrNull {
65 ((it.strength?.number == medicationSection.ciMedicationDetailData.strength?.number) &&
66 (it.strength?.unit == medicationSection.ciMedicationDetailData.strength?.unit))
67 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/video/BaseVideoCache.kt:20:13Line detected, which is longer than the defined maximum line length in the code style.
17 if (cacheDataSourceFactory == null) {
18 val downloadCache = SimpleCache(File(context.cacheDir, directory),
19 LeastRecentlyUsedCacheEvictor(size * Companion.ONE_MB))
20 cacheDataSourceFactory = CacheDataSourceFactory(downloadCache, DefaultHttpDataSourceFactory(context.packageName))
21 }
22 return cacheDataSourceFactory as CacheDataSourceFactory
23 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/webpage/BenefitsWebFragment.kt:31:1Line detected, which is longer than the defined maximum line length in the code style.
28 import com.sharecare.realgreen.core.util.withDefaultSchedulers
29 import com.sharecare.sso.services.SSOServiceImpl
30
31 class BenefitsWebFragment(private val ssoServiceProvider: () -> SSOServiceImpl = { ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.SSO) as SSOServiceImpl }) : WebViewFragment() {
32
33 private var isAppLaunch = false
34
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/webpage/EnrolmentWebPage.kt:9:1Line detected, which is longer than the defined maximum line length in the code style.
6 import com.sharecare.realgreen.core.util.NavigatorCoreUtil
7 import com.sharecare.realgreen.core.util.analytics.GeneralAnalytics
8
9 class EnrolmentWebPage(private val linkPath: String, private val analyticsPage: String, private val originalSiteSection: String = GeneralAnalytics.Page.TIMELINE)
10 : WebPage(linkPath, analyticsPage, originalSiteSection) {
11
12 override fun openScreen(context: Context, replaceContainer: Boolean) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/webpage/WebPage.kt:12:20Line detected, which is longer than the defined maximum line length in the code style.
9 import com.sharecare.realgreen.core.util.notification.NotificationAttributes
10
11 open class WebPage(private val linkPath: String, private val analyticsPage: String,
12 private val originalSiteSection: String = GeneralAnalytics.Page.TIMELINE, private val trackPage: Boolean = true,
13 val enrolmentWebView: Boolean = false) {
14
15 private val absoluteUrl: String by lazy {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/webpage/WebPage.kt:32:9Line detected, which is longer than the defined maximum line length in the code style.
29 }
30
31 protected open fun openScreen(context: Context, replaceContainer: Boolean) {
32 NavigatorCoreUtil.toWebPage(context, absoluteUrl, isTrackingSiteExit = trackPage, enrolmentWebView = enrolmentWebView, replaceContainer = replaceContainer)
33 }
34
35 private fun trackPage(siteSection: String) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/webpage/WebPageFactory.kt:27:5Line detected, which is longer than the defined maximum line length in the code style.
24 fun newCoaching() = EnrolmentWebPage("/coaching", GeneralAnalytics.Page.COACHING)
25
26 @JvmStatic
27 fun newIncentives(trackPage: Boolean = true, memberProgram: String = "") = WebPage("/rewards-program$memberProgram", GeneralAnalytics.Page.REWARDS_PROGRAM, trackPage = trackPage)
28
29 @JvmStatic
30 fun newFindFitnessCenter() = WebPage("/find-a-fitness-center", GeneralAnalytics.Page.DISCOVER, GeneralAnalytics.Page.DISCOVER)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/webpage/WebPageFactory.kt:30:5Line detected, which is longer than the defined maximum line length in the code style.
27 fun newIncentives(trackPage: Boolean = true, memberProgram: String = "") = WebPage("/rewards-program$memberProgram", GeneralAnalytics.Page.REWARDS_PROGRAM, trackPage = trackPage)
28
29 @JvmStatic
30 fun newFindFitnessCenter() = WebPage("/find-a-fitness-center", GeneralAnalytics.Page.DISCOVER, GeneralAnalytics.Page.DISCOVER)
31
32 @JvmStatic
33 fun newWindowChannel() = WebPage("/window-channel-network", GeneralAnalytics.Page.WINDOW_CHANNEL_NETWORK, GeneralAnalytics.Page.DISCOVER)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/webpage/WebPageFactory.kt:33:5Line detected, which is longer than the defined maximum line length in the code style.
30 fun newFindFitnessCenter() = WebPage("/find-a-fitness-center", GeneralAnalytics.Page.DISCOVER, GeneralAnalytics.Page.DISCOVER)
31
32 @JvmStatic
33 fun newWindowChannel() = WebPage("/window-channel-network", GeneralAnalytics.Page.WINDOW_CHANNEL_NETWORK, GeneralAnalytics.Page.DISCOVER)
34
35 @JvmStatic
36 fun newMedicationPrices() = WebPage("/drug-price/discover", GeneralAnalytics.Page.DISCOVER_MEDICATION_PRICES, GeneralAnalytics.Page.DISCOVER)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/webpage/WebPageFactory.kt:36:5Line detected, which is longer than the defined maximum line length in the code style.
33 fun newWindowChannel() = WebPage("/window-channel-network", GeneralAnalytics.Page.WINDOW_CHANNEL_NETWORK, GeneralAnalytics.Page.DISCOVER)
34
35 @JvmStatic
36 fun newMedicationPrices() = WebPage("/drug-price/discover", GeneralAnalytics.Page.DISCOVER_MEDICATION_PRICES, GeneralAnalytics.Page.DISCOVER)
37
38 @JvmStatic
39 fun newCovid() = WebPage("/covid-19", GeneralAnalytics.Page.DISCOVER, GeneralAnalytics.Page.DISCOVER)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/webpage/WebPageFactory.kt:42:5Line detected, which is longer than the defined maximum line length in the code style.
39 fun newCovid() = WebPage("/covid-19", GeneralAnalytics.Page.DISCOVER, GeneralAnalytics.Page.DISCOVER)
40
41 @JvmStatic
42 fun newCommunityWBI() = WebPage("/programs/communitywbi", GeneralAnalytics.Page.DISCOVER, GeneralAnalytics.Page.DISCOVER)
43
44 @JvmStatic
45 private fun newExternalFeatureWebPage(featureConfigurationType: FeatureConfigurationType,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/webpage/WebPageFactory.kt:55:5Line detected, which is longer than the defined maximum line length in the code style.
52 }
53
54 @JvmStatic
55 fun newFriendsAndFamily() = newExternalFeatureWebPage(FeatureConfigurationType.FRIENDS_AND_FAMILY, GeneralAnalytics.Page.FRIENDS_AND_FAMILY)
56
57 @JvmStatic
58 fun newDocway() = newExternalFeatureWebPage(FeatureConfigurationType.DOCWAY, GeneralAnalytics.Page.DOCWAY)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/webpage/WebPageFactory.kt:64:5Line detected, which is longer than the defined maximum line length in the code style.
61 fun newYourPath() = WebPage("/your-path", GeneralAnalytics.Page.YOUR_PATH, GeneralAnalytics.Page.YOUR_PATH)
62
63 @JvmStatic
64 fun newCombatingCovid19() = WebPage("/combating-covid-19", GeneralAnalytics.Page.COMBATINGCOVID19, GeneralAnalytics.Page.COMBATINGCOVID19)
65
66 @JvmStatic
67 fun newNurseTriage() = WebPage("/nurse-triage", GeneralAnalytics.Page.NURSE_TRIAGE, GeneralAnalytics.Page.NURSE_TRIAGE)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/webpage/WebPageFactory.kt:67:5Line detected, which is longer than the defined maximum line length in the code style.
64 fun newCombatingCovid19() = WebPage("/combating-covid-19", GeneralAnalytics.Page.COMBATINGCOVID19, GeneralAnalytics.Page.COMBATINGCOVID19)
65
66 @JvmStatic
67 fun newNurseTriage() = WebPage("/nurse-triage", GeneralAnalytics.Page.NURSE_TRIAGE, GeneralAnalytics.Page.NURSE_TRIAGE)
68
69 @JvmStatic
70 fun newMedicationPrice(code: String, codeSystem: String) = WebPage("/drug-price/medication-details/edit/$code/$codeSystem",
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/webpage/WebPageFactory.kt:70:5Line detected, which is longer than the defined maximum line length in the code style.
67 fun newNurseTriage() = WebPage("/nurse-triage", GeneralAnalytics.Page.NURSE_TRIAGE, GeneralAnalytics.Page.NURSE_TRIAGE)
68
69 @JvmStatic
70 fun newMedicationPrice(code: String, codeSystem: String) = WebPage("/drug-price/medication-details/edit/$code/$codeSystem",
71 GeneralAnalytics.Page.DISCOVER_MEDICATION_PRICES, GeneralAnalytics.Page.PHR.HEALTH_PROFILE)
72
73 @JvmStatic
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/webpage/WebViewFragment.kt:88:5Line detected, which is longer than the defined maximum line length in the code style.
85 private lateinit var imageUri: Uri
86 private var fileCallback: ValueCallback<Array<Uri>>? = null
87 private lateinit var binding: FragmentEmbededWebBinding
88 private val jsNavigationInitFunctionBody by lazy { resources.openRawResource(R.raw.js_navigation_init).bufferedReader().use { it.readText() } }
89
90
91 override fun onCreateView(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/webpage/WebViewFragment.kt:104:9Line detected, which is longer than the defined maximum line length in the code style.
101 modalWebView = isModalWebView()
102 hideBottomNavigationBar()
103 addMenuToToolBar()
104 ToolbarUtil.setUpBackNavigationButton(binding.toolbar.toolbar, getBaseActivity(), if (modalWebView) R.drawable.ic_tofu_cross_positive else R.drawable.ic_tofu_left)
105 wView.addJavascriptInterface(WebAnalytics(), WEB_ANALYTICS_METHOD_NAME)
106 wView.addJavascriptInterface(this, ANDROID_API)
107 wView.webViewClient = object : WebViewClient() {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/webpage/WebViewFragment.kt:605:17Line detected, which is longer than the defined maximum line length in the code style.
602 private val downloadListener =
603 DownloadListener { url, userAgent, contentDisposition, mimeType, _ ->
604 if (url.startsWith(HTTP_PREFIX, true)) {
605 //We are ignoring the mimeType as there is an issue for TrackerData which is returning wrong type, proper type is passed in contentDisposition
606 val fileName = URLUtil.guessFileName(url, contentDisposition, null)
607 val request = DownloadManager.Request(Uri.parse(url))
608 .setTitle(fileName)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/websocket/ClientWebSocket.kt:100:9Line detected, which is longer than the defined maximum line length in the code style.
97 }
98
99 private fun getAuthMessage(accessToken: String, accountId: String): String {
100 return String.format("{\"type\":\"AUTH\",\"data\":{\"account_id\":\"%s\",\"access_token\":\"%s\"}}", accountId, accessToken)
101 }
102
103
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/websocket/ClientWebSocket.kt:128:13Line detected, which is longer than the defined maximum line length in the code style.
125 serverCloseFrame: WebSocketFrame?, clientCloseFrame: WebSocketFrame?,
126 closedByServer: Boolean) {
127 super.onDisconnected(websocket, serverCloseFrame, clientCloseFrame, closedByServer)
128 L.d(TAG, "onDisconnected closed by server " + closedByServer + " serverCloseFrame " + serverCloseFrame!!.closeReason + " clientCloseFrame " + clientCloseFrame!!.closeReason)
129 // refreshing the token if server fails to auth the connection due to bad token
130 if (serverCloseFrame.closeReason == "Auth expired") {
131 PreferenceStore.setTicketSetting(AuthUtil.handleTicket())
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/websocket/SocketConnection.kt:71:5Line detected, which is longer than the defined maximum line length in the code style.
68 }
69
70 @JvmStatic
71 fun registerForSocketConnection(lifecycle: Lifecycle, eventType: EventType, messageListener: ClientWebSocket.MessageListener) {
72 val lifecycleObserver = SocketConnectionListener(listOf(eventType), messageListener)
73 lifecycle.addObserver(lifecycleObserver)
74 register(lifecycleObserver)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/websocket/SocketConnection.kt:88:9Line detected, which is longer than the defined maximum line length in the code style.
85 // if webSocket instance is not null then we are assuming the connection inProgress
86 // and not allowing for new connections.
87 fun isConnected() : Boolean {
88 L.d(TAG, "isConnected $clientWebSocket + ${clientWebSocket?.connection} + ${clientWebSocket?.connection?.isOpen} + ${clientWebSocket?.connection?.state} ")
89 return clientWebSocket != null
90 }
91
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/websocket/SocketConnection.kt:114:5Line detected, which is longer than the defined maximum line length in the code style.
111 }
112 }
113
114 private fun getHost() = ConfigurationManager().getConfiguration().getNetworkConfiguration().getHostForFeature(NetworkConfigurationType.EVENTS_WS)
115 private val TAG = "Websocket"
116
117 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/util/websocket/SocketConnectionListener.kt:26:29Line detected, which is longer than the defined maximum line length in the code style.
23 webSocketListener = RxEventBus.get().toObservable(RealTimeEvent::class.java)
24 .subscribe {
25 if (eventTypes.contains(it.type)) {
26 message.onSocketMessage(it.type.toString(), it.getParams(JsonElement::class.java)) //TODO change type
27 } else {
28 "Nothing"
29 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/view/ScreenMessageView.kt:44:5Line detected, which is longer than the defined maximum line length in the code style.
41 private val subtitleView by lazy(LazyThreadSafetyMode.NONE) { findViewById<TextView>(R.id.subtitle) }
42 private val tryAgainButton by lazy(LazyThreadSafetyMode.NONE) { findViewById<MaterialButton>(R.id.button)}
43
44 fun setValues(@DrawableRes imageRes: Int, @StringRes titleRes: Int, @StringRes subtitleRes: Int, action: OnClickListener? = null) {
45 setImage(imageRes)
46 if (titleRes != 0) {
47 titleView.setText(titleRes)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/widgets/forms/NameField.kt:44:13Line detected, which is longer than the defined maximum line length in the code style.
41
42 fun buildTextWatcher(source: TextInputEditText) = object : TextWatcher {
43 override fun afterTextChanged(s: Editable?) {
44 val validName = firstNameTextInputEditText.text?.length ?: 0 >= 1 && lastNameTextInputEditText.text?.length ?: 0 >= 1
45
46 updateErrorIndicator(source)
47
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/core/widgets/recycleView/ItemFactory.kt:57:5Line detected, which is longer than the defined maximum line length in the code style.
54 }
55 get() = dataField
56
57 inner class ViewHolder(val display: ViewDisplay<Any?>) : RecyclerView.ViewHolder(display as? View ?: throw RuntimeException("Item built is not a view"))
58
59 override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
60 val context = parent.context
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/ocr/scan/ScanMedicationAnalytics.kt:48:1Line detected, which is longer than the defined maximum line length in the code style.
45
46 fun reportMedicationScan() = AnalyticsCore.action(MEDICATION_SCAN)
47
48 fun reportMedicationAdd(item: CIMedicationDetailData) = AnalyticsCore.action(ScanMedicationAnalytics.Actions.MEDICATION_ADD)
49 .customParam(ITEM, item.displayName + ITEM_SUFFIX)
50 .customParam(DETAIL, item.matchCode.brandType)
51
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/ocr/scan/presenter/ScanMedicationPresenter.kt:11:5Line detected, which is longer than the defined maximum line length in the code style.
8 import io.reactivex.Completable
9
10 class ScanMedicationPresenter : RxPresenter<ScanMedicationFragmentView>() {
11 fun saveImage(context: Context, image: Bitmap, compressFormat: Bitmap.CompressFormat = Bitmap.CompressFormat.PNG, quality: Int = 90): Completable {
12 return image.saveAsync(
13 context,
14 "temp/scanMedication/medication.png",
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/ocr/scan/services/MedicationOcrInferService.kt:24:5Line detected, which is longer than the defined maximum line length in the code style.
21 Proxy::class.java
22 )
23
24 fun inferFromImage(image: Bitmap, compressFormat: Bitmap.CompressFormat = Bitmap.CompressFormat.PNG, quality: Int = 100): Single<CIMedicationDetailDataList> {
25 val body = image
26 .toMultipartBodyBuilder(
27 fieldName = "file",
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/ocr/scan/services/MedicationOcrInferService.kt:44:9Line detected, which is longer than the defined maximum line length in the code style.
41
42 private interface Proxy {
43 @POST("/medications-ocr/infer")
44 fun inferFromImage(@Body form: RequestBody, @Query("entity") entityReference: String): Single<List<CIMedicationDetailData>>
45 }
46 }
47
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/ocr/scan/services/MedicationOcrModule.kt:11:9Line detected, which is longer than the defined maximum line length in the code style.
8 object MedicationOcrModule {
9 @JvmStatic
10 fun init() {
11 ExternalServices.register(ServiceFactory.ServiceType.MEDICATION_OCR_INTERFACE_SERVICE, object : SharecareServiceCreator {
12 override fun createService(params: SharecareServiceParams) = MedicationOcrInferService(params)
13 })
14 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/ocr/scan/view/ScanMedicationFragment.kt:47:1Line detected, which is longer than the defined maximum line length in the code style.
44 import java.io.Serializable
45
46
47 typealias onMedicationSelected = (fragment: Fragment, medicationData: CIMedicationDetailData, dependentId: String?) -> Unit
48 typealias onTraditionalSearchRequested = (fragment: Fragment, dependentId: String?) -> Unit
49
50 class ScanMedicationFragment : RxFragment<ScanMedicationPresenter, ScanMedicationFragmentView>(), ScanMedicationFragmentView {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/ocr/scan/view/ScanMedicationFragment.kt:50:1Line detected, which is longer than the defined maximum line length in the code style.
47 typealias onMedicationSelected = (fragment: Fragment, medicationData: CIMedicationDetailData, dependentId: String?) -> Unit
48 typealias onTraditionalSearchRequested = (fragment: Fragment, dependentId: String?) -> Unit
49
50 class ScanMedicationFragment : RxFragment<ScanMedicationPresenter, ScanMedicationFragmentView>(), ScanMedicationFragmentView {
51 companion object {
52 /**
53 * Justified since there is a need to navigate back and forth between fragments in different modules.
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/ocr/scan/view/ScanMedicationFragment.kt:57:10Line detected, which is longer than the defined maximum line length in the code style.
54 * A navigates to B, and B navigates to A.
55 * C navigates to B, and C navigates to B.
56 *
57 * This interactions force to create circular references between modules. the only possible solution would be to merge
58 * all the modules containing those fragments.
59 */
60 @JvmStatic
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/ocr/scan/view/ScanMedicationFragment.kt:65:9Line detected, which is longer than the defined maximum line length in the code style.
62 val onTraditionalSearchRequested: MutableMap<String, onTraditionalSearchRequested> = mutableMapOf()
63
64 @JvmStatic
65 fun registerNavigationFlow(navigationTag: String, onMedicationSelected: onMedicationSelected, onTraditionalSearchRequested: onTraditionalSearchRequested) {
66 Companion.onMedicationSelected[navigationTag] = onMedicationSelected
67 Companion.onTraditionalSearchRequested[navigationTag] = onTraditionalSearchRequested
68 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/ocr/scan/view/ScanMedicationResultFragment.kt:36:1Line detected, which is longer than the defined maximum line length in the code style.
33 import java.io.File
34
35
36 class ScanMedicationResultFragment : RxFragment<ScanMedicationResultPresenter, ScanMedicationResultFragmentView>(), ScanMedicationResultFragmentView {
37 private var binding: ScanMedicationResultBinding? = null
38 private var medicationImage: Bitmap? = null
39 private val adapter = ScanMedicationResultAdapter()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/tool/realminteraction/ItemRealmInteraction.kt:18:5Line detected, which is longer than the defined maximum line length in the code style.
15 val dstType: Type
16 if (InsightReportLayoutType.SCORE.toString() == layout) {
17 dstType = IwScoreReport::class.java
18 } else if (InsightReportLayoutType.MSR_COMP.toString() == layout || InsightReportLayoutType.STR_COMP.toString() == layout) {
19
20 dstType = IwCompReport::class.java
21 } else {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/tool/realminteraction/RealmConfig.kt:13:2Line detected, which is longer than the defined maximum line length in the code style.
10 * RealmConfig to init and provide a configuration
11 *
12 * Realm has a bottle neck –every time we need to work with a database, we need to access it by a configuration.
13 * Unfortunately, RealmConfiguration.Builder creates different configurations every time it's called, so Realm would throw an error if we
14 * will try to access our database with a new configuration (even if the new config is logically identical to the original one).
15 *
16 * The soultiuon is to keep the configuration as a static filed in thin helper and read it once we need this exact realm database:
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/tool/realminteraction/RealmConfig.kt:14:2Line detected, which is longer than the defined maximum line length in the code style.
11 *
12 * Realm has a bottle neck –every time we need to work with a database, we need to access it by a configuration.
13 * Unfortunately, RealmConfiguration.Builder creates different configurations every time it's called, so Realm would throw an error if we
14 * will try to access our database with a new configuration (even if the new config is logically identical to the original one).
15 *
16 * The soultiuon is to keep the configuration as a static filed in thin helper and read it once we need this exact realm database:
17 * Realm.getInstance(RealmConfig.getConfiguration())
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/tool/realminteraction/RealmConfig.kt:16:2Line detected, which is longer than the defined maximum line length in the code style.
13 * Unfortunately, RealmConfiguration.Builder creates different configurations every time it's called, so Realm would throw an error if we
14 * will try to access our database with a new configuration (even if the new config is logically identical to the original one).
15 *
16 * The soultiuon is to keep the configuration as a static filed in thin helper and read it once we need this exact realm database:
17 * Realm.getInstance(RealmConfig.getConfiguration())
18 */
19
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/view/ChangeAvatarBottomSheetFragment.kt:18:1Line detected, which is longer than the defined maximum line length in the code style.
15 import com.sharecare.realgreen.core.model.AvatarOption
16
17
18 class ChangeAvatarBottomSheetFragment(private val optionsClickListener: AvatarOptionsClickListener) : BottomSheetDialogFragment(), AvatarOptionsClickListener {
19
20 private lateinit var binding: AvatarChangeBottomSheetBinding
21 private lateinit var avatarOptionsAdapter: AvatarOptionsAdapter
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/view/EffectUtil.kt:50:13Line detected, which is longer than the defined maximum line length in the code style.
47 if(oldConfettiView != null) {
48 confettiView = oldConfettiView
49 } else {
50 activity?.addContentView(confettiView, ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT))
51 }
52 val matrix = DisplayMetrics()
53 (activity?.getSystemService(Context.WINDOW_SERVICE) as WindowManager).defaultDisplay.getMetrics(matrix)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/core/src/main/java/com/sharecare/realgreen/view/SelectFilterBottomSheet.kt:49:13Line detected, which is longer than the defined maximum line length in the code style.
46 private fun multiSelectionContainer() {
47 binding.optionsContainer.removeAllViews()
48 list.forEach { item ->
49 val checkBoxView: ViewFilterCheckboxBinding = ViewFilterCheckboxBinding.inflate(LayoutInflater.from(context))
50 with(checkBoxView.checkbox) {
51 text = item.title()
52 isChecked = item.isSelected
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_advocacy/src/main/java/com/sharecare/advocacy/common/AdvocacyFeature.kt:15:13Line detected, which is longer than the defined maximum line length in the code style.
12
13 fun init() {
14 ExternalServices.register(ServiceFactory.ServiceType.ADVOCACY, object : FeingoldServiceCreator {
15 override fun createService(params: FeingoldServiceParams): FeingoldService = AdvocacyOnboardingServiceImpl(params)
16 })
17
18 ExternalServices.register(ServiceFactory.ServiceType.FAB, object : FeingoldServiceCreator {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_advocacy/src/main/java/com/sharecare/advocacy/repository/AdvocacyOnBoardingRepository.kt:29:9Line detected, which is longer than the defined maximum line length in the code style.
26 ) : Logger by logs {
27
28 init {
29 ParsingUtil.registerExternalDeserializer(AdvocacyOnboardingDirectives::class.java, AdvocateOnboardingDeserializer())
30 }
31
32 suspend fun fetchPreferences(): AdvocacyUpdateModel? = withContext(Dispatchers.IO) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_advocacy/src/main/java/com/sharecare/advocacy/repository/AdvocacyOnBoardingRepository.kt:44:13Line detected, which is longer than the defined maximum line length in the code style.
41 @Reminder("Response could get cached to reduce network calls")
42 suspend fun fetchIntroDirectives(): AdvocacyOnboardingDirectives? = withContext(Dispatchers.IO) {
43 try {
44 val response: Response<AdvocacyOnboardingDirectives?> = serviceProvider().getAdvocacyOnboardingDirectives().execute()
45 when {
46 response.code() == HTTP_NO_CONTENT -> {
47 i("No content response fetching intro directives")
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_advocacy/src/main/java/com/sharecare/advocacy/repository/AdvocacyOnBoardingRepository.kt:55:21Line detected, which is longer than the defined maximum line length in the code style.
52 return@withContext response.body()!!
53 }
54 else -> throw com.sharecare.models.RemoteException(
55 "Fetching advocacy onboarding directives was unsuccessful (${response.code()} - ${response.message()})",
56 RemoteException.ErrorCode.UNHANDLED
57 )
58 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_advocacy/src/main/java/com/sharecare/advocacy/repository/AdvocacyOnboardingServiceImpl.kt:21:5Line detected, which is longer than the defined maximum line length in the code style.
18
19 private fun getProxy() = createService(AdvocacyOnboardingService::class.java)
20
21 override fun getAdvocacyOnboardingDirectives(): Call<AdvocacyOnboardingDirectives?> = getProxy().getAdvocacyOnboardingDirectives()
22
23 override fun getAdvocacyPreferences() = getProxy().getAdvocacyPreferences()
24
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_advocacy/src/main/java/com/sharecare/advocacy/repository/AdvocateDeserializer.kt:19:17Line detected, which is longer than the defined maximum line length in the code style.
16 with(json?.asJsonObject) {
17 Gson().fromJson(json, AdvocateModel::class.java).copy(
18 advocateType = AdvocateType.find(this?.getAsJsonPrimitive(AdvocateModel::advocateType.name)?.asString),
19 advocateStatus = AdvocateStatus.find(this?.getAsJsonPrimitive(AdvocateModel::advocateStatus.name)?.asString),
20 )
21 }
22 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_advocacy/src/main/java/com/sharecare/advocacy/repository/AdvocateOnboardingDeserializer.kt:15:5Line detected, which is longer than the defined maximum line length in the code style.
12
13 class AdvocateOnboardingDeserializer : JsonDeserializer<AdvocacyOnboardingDirectives> {
14
15 override fun deserialize(json: JsonElement?, typeOfT: Type?, context: JsonDeserializationContext?): AdvocacyOnboardingDirectives =
16 with(json?.asJsonObject) {
17 Gson().fromJson(json, AdvocacyOnboardingDirectives::class.java).copy(
18 screenFlow = AdvocacyScreenFlow.find(this?.getAsJsonPrimitive(AdvocacyOnboardingDirectives::screenFlow.name)?.asString)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_advocacy/src/main/java/com/sharecare/advocacy/repository/AdvocateOnboardingDeserializer.kt:18:17Line detected, which is longer than the defined maximum line length in the code style.
15 override fun deserialize(json: JsonElement?, typeOfT: Type?, context: JsonDeserializationContext?): AdvocacyOnboardingDirectives =
16 with(json?.asJsonObject) {
17 Gson().fromJson(json, AdvocacyOnboardingDirectives::class.java).copy(
18 screenFlow = AdvocacyScreenFlow.find(this?.getAsJsonPrimitive(AdvocacyOnboardingDirectives::screenFlow.name)?.asString)
19 )
20 }
21 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_advocacy/src/main/java/com/sharecare/advocacy/repository/FabServiceImpl.kt:15:1Line detected, which is longer than the defined maximum line length in the code style.
12 import com.sharecare.realgreen.core.configuration.feature.NetworkConfigurationType
13 import retrofit2.Call
14
15 class FabServiceImpl(params: FeingoldServiceParams) : FeingoldService(params, NetworkConfigurationType.DEFAULT_CONFIGURATION_HOST),
16 FabService,
17 Logger by AndroidLogger(globalInjection().get<AdvocacyParams>().enableLogs, globalInjection().get<AdvocacyParams>().logTag) {
18
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_advocacy/src/main/java/com/sharecare/advocacy/repository/FabServiceImpl.kt:17:5Line detected, which is longer than the defined maximum line length in the code style.
14
15 class FabServiceImpl(params: FeingoldServiceParams) : FeingoldService(params, NetworkConfigurationType.DEFAULT_CONFIGURATION_HOST),
16 FabService,
17 Logger by AndroidLogger(globalInjection().get<AdvocacyParams>().enableLogs, globalInjection().get<AdvocacyParams>().logTag) {
18
19 override fun getServiceType(): ServiceFactory.ServiceType = ServiceFactory.ServiceType.FAB
20
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_advocacy/src/main/java/com/sharecare/advocacy/repository/FabServiceImpl.kt:26:9Line detected, which is longer than the defined maximum line length in the code style.
23 override fun getFab(): Call<FabDto?> = try {
24 getProxy().getFab()
25 } catch (e: ClassCastException) {
26 e("Retrofit failed to parse the response. This probably a server issue: when null instead of \"{}\" gets returned", e)
27 throw RemoteException(
28 "Caught parsing exception",
29 RemoteException.ErrorCode.MALFORMED_SERVER_RESPONSE
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_advocacy/src/main/java/com/sharecare/advocacy/repository/RemoteAdvocacyRepository.kt:76:33Line detected, which is longer than the defined maximum line length in the code style.
73 } else {
74 when (ex) {
75 is com.sharecare.models.RemoteException -> {
76 e("[Code ${ex.code}]Remote Exception on refresh advocates: ${ex.message}. ${ex.response.toString()}", ex)
77 when (ex.code) {
78 com.sharecare.models.RemoteException.ErrorCode.NETWORK -> onComplete(AdvocacyIssue.INTERNET)
79 com.sharecare.models.RemoteException.ErrorCode.BAD_REQUEST,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_advocacy/src/main/java/com/sharecare/advocacy/repository/RemoteAdvocacyRepository.kt:78:37Line detected, which is longer than the defined maximum line length in the code style.
75 is com.sharecare.models.RemoteException -> {
76 e("[Code ${ex.code}]Remote Exception on refresh advocates: ${ex.message}. ${ex.response.toString()}", ex)
77 when (ex.code) {
78 com.sharecare.models.RemoteException.ErrorCode.NETWORK -> onComplete(AdvocacyIssue.INTERNET)
79 com.sharecare.models.RemoteException.ErrorCode.BAD_REQUEST,
80 com.sharecare.models.RemoteException.ErrorCode.NOT_FOUND,
81 com.sharecare.models.RemoteException.ErrorCode.DATA_ERROR,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_advocacy/src/main/java/com/sharecare/advocacy/repository/RemoteAdvocacyRepository.kt:82:37Line detected, which is longer than the defined maximum line length in the code style.
79 com.sharecare.models.RemoteException.ErrorCode.BAD_REQUEST,
80 com.sharecare.models.RemoteException.ErrorCode.NOT_FOUND,
81 com.sharecare.models.RemoteException.ErrorCode.DATA_ERROR,
82 com.sharecare.models.RemoteException.ErrorCode.MALFORMED_SERVER_RESPONSE -> onComplete(AdvocacyIssue.SERVICE)
83 else -> onComplete(AdvocacyIssue.UNDEFINED)
84 }
85 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_advocacy/src/main/java/com/sharecare/advocacy/ui/binding/AdvocacyBindings.kt:26:1Line detected, which is longer than the defined maximum line length in the code style.
23 * Used via reflection
24 */
25 @Suppress("unused")
26 fun AdvocacyContentFragmentBinding.bindAdvocateDock(presenter: AdvocacyPresenter, old: AdvocacyScreenState?, new: AdvocacyScreenState) =
27 with(new) {
28 val isInit = old == null
29 presenter.i("Updating advocate dock bindings (init: ${isInit})")
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_advocacy/src/main/java/com/sharecare/advocacy/ui/binding/AdvocacyBindings.kt:88:17Line detected, which is longer than the defined maximum line length in the code style.
85 AdvocateType.GROUP -> advocateStatus?.text(presenter.requireCtx())
86 else -> ""
87 }
88 callBtnSecondary.visible = isAvailable() && !advocatePhone.isNullOrBlank() && !advocatePhone.isNullOrBlank()
89 messageBtnSecondary.visible = isAvailable() && !advocateChatUrl.isNullOrBlank()
90 offlineCardSecondary.visible = !isAvailable()
91 offlineLabelSecondary.text = extendedName(presenter.requireCtx())
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_advocacy/src/main/java/com/sharecare/advocacy/ui/binding/AdvocacyBindings.kt:129:1Line detected, which is longer than the defined maximum line length in the code style.
126 /**
127 * Used via reflection
128 */
129 fun AdvocacyProfileFragmentBinding.bindAdvocateProfile(presenter: AdvocacyPresenter, old: AdvocacyScreenState?, new: AdvocacyScreenState) =
130 with(new) {
131 val isInit = old == null
132 presenter.i("Updating advocate profile bindings (init: ${isInit})")
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_advocacy/src/main/java/com/sharecare/advocacy/ui/presenter/AdvocacyOnboardingPresenter.kt:116:21Line detected, which is longer than the defined maximum line length in the code style.
113 } catch (e: Exception) {
114 e("Failure submit prefs", e)
115 when (e) {
116 is IllegalStateException -> updateUiState { it.copy(loading = false, errorMsg = appContext().getString(R.string.onboarding_mfa_add_phone_error_invalid)) }
117 else -> updateUiState { it.copy(loading = false, errorMsg = appContext().getString(R.string.something_went_wrong)) }
118 }
119
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_advocacy/src/main/java/com/sharecare/advocacy/ui/presenter/AdvocacyOnboardingPresenter.kt:117:21Line detected, which is longer than the defined maximum line length in the code style.
114 e("Failure submit prefs", e)
115 when (e) {
116 is IllegalStateException -> updateUiState { it.copy(loading = false, errorMsg = appContext().getString(R.string.onboarding_mfa_add_phone_error_invalid)) }
117 else -> updateUiState { it.copy(loading = false, errorMsg = appContext().getString(R.string.something_went_wrong)) }
118 }
119
120 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_advocacy/src/main/java/com/sharecare/advocacy/ui/presenter/AdvocacyPresenter.kt:90:13Line detected, which is longer than the defined maximum line length in the code style.
87 fun selectAdvocateProfile(advocateId: String) = requireScope().launch {
88 i("Selecting advocate profile")
89 updateUiState {
90 it.copy(selectedAdvocate = repository.advocateFlow.value.second.firstOrNull { model: AdvocateModel? -> model?.advocateId == advocateId }
91 ?: repository.fetchAdvocate(advocateId))
92 }
93 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_advocacy/src/main/java/com/sharecare/advocacy/ui/presenter/AdvocacyResult.kt:58:1Line detected, which is longer than the defined maximum line length in the code style.
55 fun FabStatus.makeResult(messageCenter: MessageCenter? = null, vararg advocates: AdvocateModel): AdvocacyResult =
56 Triple(this, advocates.toList(), messageCenter)
57
58 fun FabStatus.makeResult(messageCenter: MessageCenter? = null, advocates: List<AdvocateModel> = listOf()): AdvocacyResult =
59 Triple(this, advocates, messageCenter)
60
61
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_advocacy/src/main/java/com/sharecare/advocacy/ui/presenter/FabController.kt:59:17Line detected, which is longer than the defined maximum line length in the code style.
56
57 scope.launch {
58 repository.advocateFlow.collect {
59 d("Fab repo fab status ${it.first} ->> Repo loading ${repository.isLoading()}; Repo disabled -> ${repository.isDisabled()}; ${destination().supportsFab()}")
60 if(it.first == FabStatus.Enabled){
61 show(LOADING.isCurrent())
62 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_advocacy/src/main/java/com/sharecare/advocacy/ui/presenter/FabController.kt:147:13Line detected, which is longer than the defined maximum line length in the code style.
144 suspend fun collect(dispatch: suspend (new: FabWidgetState) -> Unit) = withContext(Dispatchers.Main) {
145 i("Collecting FAB controller!!")
146 launch {
147 fabFlow.combine(repository.advocateFlow.map { result -> result.areInputsValid() }) { s: FabWidgetState, enable: Boolean -> enable to s }
148 .collect { (enable, new) ->
149 if (enable) {
150 dispatch(new)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_advocacy/src/main/java/com/sharecare/advocacy/ui/view/content/AdvocacyContentFragment.kt:24:5Line detected, which is longer than the defined maximum line length in the code style.
21 @Suppress("unused")
22 class AdvocacyContentFragment : BaseMvpFragment<AdvocacyPresenter, AdvocacyOverlayApi>(),
23 AdvocacyOverlayApi,
24 Logger by AndroidLogger(globalInjection().get<AdvocacyParams>().enableLogs, globalInjection().get<AdvocacyParams>().logTag) {
25
26 private val layout = R.layout.advocacy_content_fragment
27
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_advocacy/src/main/java/com/sharecare/advocacy/ui/view/fab/FabContainerFragment.kt:68:9Line detected, which is longer than the defined maximum line length in the code style.
65 }
66
67 fun FabContainerFragmentBinding.onViewCreated() {
68 includeFab.fabCard.setOnClickListener { lifecycleScope.launch { fabController.onClickFab(this@FabContainerFragment) } }
69 observeTransitions()
70 collectFabController()
71 TooltipTag.AdvocacyFab.assignToView(includeFab.fabCard)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_advocacy/src/main/java/com/sharecare/advocacy/ui/view/preferences/AdvocacySetupBinding.kt:62:9Line detected, which is longer than the defined maximum line length in the code style.
59
60 onboardingDirectives?.phoneQuestion?.let { phoneLabel.text = it }
61
62 if (!onboardingDirectives?.phoneHelpTitle.isNullOrBlank() && !onboardingDirectives?.phoneHelpText.isNullOrBlank()) {
63 advocatePhoneNoContainer.endIconDrawable =
64 AppCompatResources.getDrawable(advocatePhoneNoContainer.context, R.drawable.ic_tofu_info)
65 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_advocacy/src/main/java/com/sharecare/advocacy/ui/view/preferences/AdvocacySetupBinding.kt:67:9Line detected, which is longer than the defined maximum line length in the code style.
64 AppCompatResources.getDrawable(advocatePhoneNoContainer.context, R.drawable.ic_tofu_info)
65 }
66 advocatePhoneNoContainer.endIconMode = END_ICON_CUSTOM
67 advocatePhoneNoContainer.setEndIconTintList(ColorStateList.valueOf(presenter.requireCtx().getColor(R.color.medium)))
68 advocatePhoneNoContainer.setEndIconOnClickListener {
69 //double check if still valid
70 if (!onboardingDirectives?.phoneHelpTitle.isNullOrBlank() && !onboardingDirectives?.phoneHelpText.isNullOrBlank()) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_advocacy/src/main/java/com/sharecare/advocacy/ui/view/preferences/AdvocacySetupBinding.kt:70:13Line detected, which is longer than the defined maximum line length in the code style.
67 advocatePhoneNoContainer.setEndIconTintList(ColorStateList.valueOf(presenter.requireCtx().getColor(R.color.medium)))
68 advocatePhoneNoContainer.setEndIconOnClickListener {
69 //double check if still valid
70 if (!onboardingDirectives?.phoneHelpTitle.isNullOrBlank() && !onboardingDirectives?.phoneHelpText.isNullOrBlank()) {
71 presenter.navigateToPhoneInfo()
72 }
73 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_advocacy/src/main/java/com/sharecare/advocacy/ui/view/preferences/AdvocacySetupBinding.kt:90:5Line detected, which is longer than the defined maximum line length in the code style.
87 fragmentAdvocacySetupBinding.advocateGenderDisclaimer.visible = advocacySetupState.isPrimary &&
88 advocacySetupState.onboardingDirectives != null &&
89 !advocacySetupState.onboardingDirectives.genderPreferenceDisclaimer.isNullOrBlank()
90 fragmentAdvocacySetupBinding.advocateGenderDisclaimer.text = advocacySetupState.onboardingDirectives?.genderPreferenceDisclaimer
91
92
93 if (advocacySetupState.isPrimary) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_advocacy/src/main/java/com/sharecare/advocacy/ui/view/preferences/AdvocacySetupBinding.kt:97:9Line detected, which is longer than the defined maximum line length in the code style.
94 val genderList = ArrayList<String>()
95 PreferredAdvocateGender.values().forEach { genderList.add(it.stringRes(presenter.requireCtx())) }
96 fragmentAdvocacySetupBinding.advocateGenderDropdown.setDropDownBackgroundResource(R.color.surface)
97 fragmentAdvocacySetupBinding.advocateGenderDropdown.setText(PreferredAdvocateGender.NOT_SPECIFIED.stringRes(presenter.requireCtx()))
98 val adapter: ArrayAdapter<String> = ArrayAdapter<String>(presenter.requireCtx(), R.layout.row_spn_left_dropdown, genderList)
99 fragmentAdvocacySetupBinding.advocateGenderDropdown.setAdapter(adapter)
100 fragmentAdvocacySetupBinding.advocateGenderDropdown.setOnItemClickListener { _, _, position, _ ->
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_advocacy/src/main/java/com/sharecare/advocacy/ui/view/preferences/AdvocacySetupBinding.kt:98:9Line detected, which is longer than the defined maximum line length in the code style.
95 PreferredAdvocateGender.values().forEach { genderList.add(it.stringRes(presenter.requireCtx())) }
96 fragmentAdvocacySetupBinding.advocateGenderDropdown.setDropDownBackgroundResource(R.color.surface)
97 fragmentAdvocacySetupBinding.advocateGenderDropdown.setText(PreferredAdvocateGender.NOT_SPECIFIED.stringRes(presenter.requireCtx()))
98 val adapter: ArrayAdapter<String> = ArrayAdapter<String>(presenter.requireCtx(), R.layout.row_spn_left_dropdown, genderList)
99 fragmentAdvocacySetupBinding.advocateGenderDropdown.setAdapter(adapter)
100 fragmentAdvocacySetupBinding.advocateGenderDropdown.setOnItemClickListener { _, _, position, _ ->
101 presenter.requireScope()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_advocacy/src/main/java/com/sharecare/advocacy/ui/view/preferences/AdvocacySetupBinding.kt:102:17Line detected, which is longer than the defined maximum line length in the code style.
99 fragmentAdvocacySetupBinding.advocateGenderDropdown.setAdapter(adapter)
100 fragmentAdvocacySetupBinding.advocateGenderDropdown.setOnItemClickListener { _, _, position, _ ->
101 presenter.requireScope()
102 .launch { presenter.updateUiState { it.copy(preferredAdvocateGender = PreferredAdvocateGender.values()[position]) } }
103 presenter.advocacyAnalytics.reportFieldCompleteEvent(GeneralAnalytics.FormField.GENDER_PREFERENCE)
104 }
105 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_advocacy/src/main/java/com/sharecare/advocacy/ui/view/preferences/AdvocacySetupBinding.kt:115:5Line detected, which is longer than the defined maximum line length in the code style.
112 ) {
113 fragmentAdvocacySetupBinding.advocatePronounDropdown.tag = true
114 val genderList = ArrayList<String>()
115 MyPronoun.values().filterNot { it == MyPronoun.NONE }.forEach { genderList.add(it.stringRes(presenter.requireCtx())) }
116 fragmentAdvocacySetupBinding.advocatePronounDropdown.setDropDownBackgroundResource(R.color.surface)
117 advocacySetupState.myPronoun?.let { fragmentAdvocacySetupBinding.advocatePronounDropdown.setText(it.stringRes(presenter.requireCtx())) }
118 val adapter: ArrayAdapter<String> = ArrayAdapter<String>(presenter.requireCtx(), R.layout.row_spn_left_dropdown, genderList)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_advocacy/src/main/java/com/sharecare/advocacy/ui/view/preferences/AdvocacySetupBinding.kt:117:5Line detected, which is longer than the defined maximum line length in the code style.
114 val genderList = ArrayList<String>()
115 MyPronoun.values().filterNot { it == MyPronoun.NONE }.forEach { genderList.add(it.stringRes(presenter.requireCtx())) }
116 fragmentAdvocacySetupBinding.advocatePronounDropdown.setDropDownBackgroundResource(R.color.surface)
117 advocacySetupState.myPronoun?.let { fragmentAdvocacySetupBinding.advocatePronounDropdown.setText(it.stringRes(presenter.requireCtx())) }
118 val adapter: ArrayAdapter<String> = ArrayAdapter<String>(presenter.requireCtx(), R.layout.row_spn_left_dropdown, genderList)
119 fragmentAdvocacySetupBinding.advocatePronounDropdown.setAdapter(adapter)
120 fragmentAdvocacySetupBinding.advocatePronounDropdown.setOnItemClickListener { _, _, position, _ ->
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_advocacy/src/main/java/com/sharecare/advocacy/ui/view/preferences/AdvocacySetupBinding.kt:118:5Line detected, which is longer than the defined maximum line length in the code style.
115 MyPronoun.values().filterNot { it == MyPronoun.NONE }.forEach { genderList.add(it.stringRes(presenter.requireCtx())) }
116 fragmentAdvocacySetupBinding.advocatePronounDropdown.setDropDownBackgroundResource(R.color.surface)
117 advocacySetupState.myPronoun?.let { fragmentAdvocacySetupBinding.advocatePronounDropdown.setText(it.stringRes(presenter.requireCtx())) }
118 val adapter: ArrayAdapter<String> = ArrayAdapter<String>(presenter.requireCtx(), R.layout.row_spn_left_dropdown, genderList)
119 fragmentAdvocacySetupBinding.advocatePronounDropdown.setAdapter(adapter)
120 fragmentAdvocacySetupBinding.advocatePronounDropdown.setOnItemClickListener { _, _, position, _ ->
121 presenter.requireScope().launch {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_advocacy/src/main/java/com/sharecare/advocacy/ui/view/preferences/PhoneInfoFragment.kt:59:1Line detected, which is longer than the defined maximum line length in the code style.
56 }
57 }
58
59 fun FragmentPhoneInfoBinding.bindPhoneInfo(presenter: AdvocacyOnboardingPresenter, old: AdvocacySetupState?, new: AdvocacySetupState) {
60 toolbar.toolbar.setOnClickListener { presenter.closePhoneInfo() }
61 toolbar.toolbar.navigationIcon = AppCompatResources.getDrawable(toolbar.toolbar.context, R.drawable.ic_tofu_close)
62 .apply { this?.setTint(presenter.requireCtx().getColor(R.color.high)) }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_askmd/src/main/java/com/feingoldtech/realgreen/askmd/presentation/recent/ui/AskMdRecentConsultationsFragment.kt:35:1Line detected, which is longer than the defined maximum line length in the code style.
32 import com.sharecare.realgreen.core.util.analytics.AnalyticsCore
33 import com.sharecare.realgreen.core.util.analytics.GeneralAnalytics
34
35 class AskMdRecentConsultationsFragment : BaseFragment<AskMdRecentConsultationsPresenter, AskMdRecentConsultationsMvpView>(), AskMdRecentConsultationsMvpView, RecentConsultationsAdapter.OnConsultationListener {
36
37 private lateinit var binding: ActivityConsultationsBinding
38 private var adapter: RecentConsultationsAdapter? = null
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_askmd/src/main/java/com/feingoldtech/realgreen/askmd/presentation/search/ui/DefaultAskMdSearchListener.kt:11:1Line detected, which is longer than the defined maximum line length in the code style.
8 import com.feingoldtech.realgreen.askmd.model.type.ConsultationType
9 import java.lang.ref.WeakReference
10
11 class DefaultAskMdSearchListener(context: Context, private val term: String?) : AskMdSearchResultAdapter.AskMdSearchListener {
12 private val contextRef = WeakReference(context)
13
14 override fun onSearchResultItemClicked(consultationTopic: ConsultationTopic) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_benefits_hub/src/main/java/com/sharecare/realgreen/benefits/presentation/home/presenter/SponsorProductsListPresenter.kt:37:1Line detected, which is longer than the defined maximum line length in the code style.
34 import com.sharecare.realgreen.core.util.link.UndefinedDestination
35 import java.text.SimpleDateFormat
36
37 class SponsorProductsListPresenter(private val advocacyEnabled: Boolean, private val benefitHookResponse: BenefitFeedHook, private val sponsorProductsPair: SponsorProductsPair) : BasePresenter<SponsorProductsListMvpView>() {
38
39 private val list: List<Product> by lazy { sponsorProductsPair.productList }
40
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_benefits_hub/src/main/java/com/sharecare/realgreen/benefits/presentation/home/presenter/SponsorProductsListPresenter.kt:62:9Line detected, which is longer than the defined maximum line length in the code style.
59 getOthersSponsoredList(),
60 false
61 )
62 val benefits = convertBenefitsToHeaderProducts(benefitHookResponse, advocacyEnabled, healthcareTitle, localSponsorTitle)
63
64 val fullList = shareCareSponsoredList + othersSponsoredList
65 val orderedList = fullList.sortedBy { it.product?.displayName }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_benefits_hub/src/main/java/com/sharecare/realgreen/benefits/presentation/home/ui/SponsorProductsListFragment.kt:36:1Line detected, which is longer than the defined maximum line length in the code style.
33 import kotlinx.android.synthetic.main.benefits_header_view.view.title
34
35
36 class SponsorProductsListFragment : BaseFragment<SponsorProductsListPresenter, SponsorProductsListMvpView>(), SponsorProductsListMvpView, FabOverlay {
37
38 companion object {
39 private const val EXTRA_RESPONSE_ID = "response"
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_benefits_hub/src/main/java/com/sharecare/realgreen/benefits/presentation/home/ui/adapter/BenefitsTitleViewHolder.kt:7:1Line detected, which is longer than the defined maximum line length in the code style.
4 import com.sharecare.realgreen.benefits.model.HeaderProduct
5 import com.sharecare.realgreen.core.tool.listadapter.viewholder.BindableViewHolder
6
7 class BenefitsTitleViewHolder(private val binding: BenefitsTitleViewBinding) : BindableViewHolder<HeaderProduct>(binding.root) {
8 override fun onBind(headerProduct: HeaderProduct) {
9 binding.sponsorTitle.text = headerProduct.title
10 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_benefits_hub/src/main/java/com/sharecare/realgreen/benefits/presentation/home/ui/adapter/ProductViewHolder.kt:14:1Line detected, which is longer than the defined maximum line length in the code style.
11 import com.sharecare.realgreen.core.util.DataBindingAdapters
12 import com.sharecare.realgreen.core.util.imageloader.ImageLoader
13
14 class ProductViewHolder(private val binding: BenefitsListItemBinding) : BindableViewHolder<HeaderProduct>(binding.root) {
15
16 override fun onBind(headerProduct: HeaderProduct) {
17
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_benefits_hub/src/main/java/com/sharecare/realgreen/benefits/presentation/home/ui/adapter/SponsorProductsListAdapter.kt:15:1Line detected, which is longer than the defined maximum line length in the code style.
12 import com.sharecare.realgreen.core.tool.listadapter.viewholder.BindableViewHolder
13
14
15 class SponsorProductsListAdapter(val context: Activity, items: List<HeaderProduct>, itemClickListener: ItemClickListener<HeaderProduct>, renderHeaderView: View?) : HeaderFooterListAdapter<HeaderProduct, BindableViewHolder<HeaderProduct>>(items) {
16 override fun onCreateActualViewHolder(parent: ViewGroup, viewType: Int) = when (viewType ) {
17 TYPE_HEALTHCARE_BENEFIT -> {
18 HorizontalListViewHolder(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_benefits_hub/src/main/java/com/sharecare/realgreen/benefits/presentation/home/ui/adapter/SponsorProductsListAdapter.kt:53:5Line detected, which is longer than the defined maximum line length in the code style.
50 super.getActualViewType(position)
51 }
52
53 override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = if (viewType == TYPE_SUBTITLE || viewType == TYPE_HEALTHCARE_BENEFIT) {
54 onCreateActualViewHolder(parent, viewType)
55 } else {
56 super.onCreateViewHolder(parent, viewType)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_benefits_hub/src/main/java/com/sharecare/realgreen/benefits/presentation/home/ui/adapter/YourHealthCareViewHolder.kt:10:1Line detected, which is longer than the defined maximum line length in the code style.
7 import com.sharecare.realgreen.core.util.DataBindingAdapters
8 import com.sharecare.realgreen.core.util.imageloader.ImageLoader
9
10 class YourHealthCareViewHolder(private val binding: HealthcareBenefitBasicItemBinding) : RecyclerView.ViewHolder(binding.root) {
11 fun onBind(benefitFeed: BenefitFeed) {
12 binding.title.text = benefitFeed.benefitItem.title
13 binding.logo.setImageBitmap(null)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_benefits_hub/src/main/java/com/sharecare/realgreen/benefits/presentation/multisponsor/presenter/MultiSponsorPresenter.kt:14:1Line detected, which is longer than the defined maximum line length in the code style.
11 import com.sharecare.realgreen.core.mvp.BasePresenter
12 import com.sharecare.realgreen.core.util.analytics.AnalyticsCore
13
14 class MultiSponsorPresenter(private val benefitHookResponse: BenefitFeedHook, private val benefitsObjectArray: Array<SponsorProductsPair>) : BasePresenter<SponsorsListView>() {
15
16 private val response: List<SponsorProductsPair> by lazy { benefitsObjectArray.toList() }
17 override fun attachView(mvpView: SponsorsListView?) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_benefits_hub/src/main/java/com/sharecare/realgreen/benefits/presentation/multisponsor/ui/SponsorsListFragment.kt:68:9Line detected, which is longer than the defined maximum line length in the code style.
65 companion object {
66 private const val EXTRA_RESPONSE_ID = "response"
67 private const val EXTRA_HOOK_RESPONSE_ID = "hook_response"
68 fun getInstance(benefitHook: BenefitFeedHook, response: Array<SponsorProductsPair>) = SponsorsListFragment().apply {
69 arguments = Bundle().apply {
70 putSerializable(EXTRA_HOOK_RESPONSE_ID, benefitHook)
71 putSerializable(EXTRA_RESPONSE_ID, response)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_benefits_hub/src/main/java/com/sharecare/realgreen/benefits/presentation/profile/ui/BenefitsProfileFragment.kt:25:1Line detected, which is longer than the defined maximum line length in the code style.
22 import com.sharecare.realgreen.core.util.NavigatorCoreUtil
23 import com.sharecare.realgreen.core.util.imageloader.ImageLoader
24
25 class BenefitsProfileFragment : BaseFragment<BenefitsProfilePresenter, BenefitsProfileView>(), BenefitsProfileView, FabOverlay {
26 private lateinit var binding: FragmentBenefitsProfileBinding
27 private var externalLinkUrl: String = UNKNOWN
28
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_benefits_hub/src/main/java/com/sharecare/realgreen/benefits/presenter/BenefitsHubPresenter.kt:16:1Line detected, which is longer than the defined maximum line length in the code style.
13 import io.reactivex.functions.BiFunction
14
15
16 class BenefitsHubPresenter(private val benefitsRepository: BenefitsHubRepository, private val destinationId: String) : BasePresenter<BenefitsHubFragmentMvpView>() {
17
18 fun initialize() {
19 addDisposable(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_benefits_hub/src/main/java/com/sharecare/realgreen/benefits/presenter/BenefitsHubPresenter.kt:65:5Line detected, which is longer than the defined maximum line length in the code style.
62 }
63 }
64
65 private fun navigateToSpecificSponsorProductsList(benefitHook: BenefitFeedHook, sponsorProductsPairs: List<SponsorProductsPair>) {
66 val sponsorProductsPair = sponsorProductsPairs.find {
67 it.sponsor.sponsorKey == destinationId
68 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_benefits_hub/src/main/java/com/sharecare/realgreen/benefits/utils/BenefitsUtils.kt:55:9Line detected, which is longer than the defined maximum line length in the code style.
52 fun getProfilePageName(sponsorName: String?) = "Benefits|${sponsorName ?: UNKNOWN}"
53
54 fun getImageUrl(product: Product) = product.getProductDetailValue(
55 if (product.productType == SPONSORED_KEY || product.productType == SC_DIGITAL || product.productType == REWARDS) LOGO_KEY else THUMBNAIL_URL_KEY)
56
57 fun convertProductsToHeadersProducts(productList: List<Product>, isSharecareSponsor: Boolean): List<HeaderProduct> = productList.map {
58 HeaderProduct(it, title = null, containsHeader = false, isShareCareSponsor = isSharecareSponsor,additionalBenefitTitle = null)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_benefits_hub/src/main/java/com/sharecare/realgreen/benefits/utils/BenefitsUtils.kt:57:5Line detected, which is longer than the defined maximum line length in the code style.
54 fun getImageUrl(product: Product) = product.getProductDetailValue(
55 if (product.productType == SPONSORED_KEY || product.productType == SC_DIGITAL || product.productType == REWARDS) LOGO_KEY else THUMBNAIL_URL_KEY)
56
57 fun convertProductsToHeadersProducts(productList: List<Product>, isSharecareSponsor: Boolean): List<HeaderProduct> = productList.map {
58 HeaderProduct(it, title = null, containsHeader = false, isShareCareSponsor = isSharecareSponsor,additionalBenefitTitle = null)
59 }
60
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_benefits_hub/src/main/java/com/sharecare/realgreen/benefits/utils/BenefitsUtils.kt:58:9Line detected, which is longer than the defined maximum line length in the code style.
55 if (product.productType == SPONSORED_KEY || product.productType == SC_DIGITAL || product.productType == REWARDS) LOGO_KEY else THUMBNAIL_URL_KEY)
56
57 fun convertProductsToHeadersProducts(productList: List<Product>, isSharecareSponsor: Boolean): List<HeaderProduct> = productList.map {
58 HeaderProduct(it, title = null, containsHeader = false, isShareCareSponsor = isSharecareSponsor,additionalBenefitTitle = null)
59 }
60
61 fun convertBenefitsToHeaderProducts(benefitFeedHook: BenefitFeedHook, advocacy: Boolean, healthcareTitle: String, localSponsorTitle: String): HeaderProduct =
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_benefits_hub/src/main/java/com/sharecare/realgreen/benefits/utils/BenefitsUtils.kt:61:5Line detected, which is longer than the defined maximum line length in the code style.
58 HeaderProduct(it, title = null, containsHeader = false, isShareCareSponsor = isSharecareSponsor,additionalBenefitTitle = null)
59 }
60
61 fun convertBenefitsToHeaderProducts(benefitFeedHook: BenefitFeedHook, advocacy: Boolean, healthcareTitle: String, localSponsorTitle: String): HeaderProduct =
62 HeaderProduct(null, benefitFeedHook.benefiFeedHookList, advocacyEnabled = advocacy, healthcareTitle, localSponsorTitle)
63 }
64
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_benefits_hub/src/main/java/com/sharecare/realgreen/benefits/utils/BenefitsUtils.kt:62:9Line detected, which is longer than the defined maximum line length in the code style.
59 }
60
61 fun convertBenefitsToHeaderProducts(benefitFeedHook: BenefitFeedHook, advocacy: Boolean, healthcareTitle: String, localSponsorTitle: String): HeaderProduct =
62 HeaderProduct(null, benefitFeedHook.benefiFeedHookList, advocacyEnabled = advocacy, healthcareTitle, localSponsorTitle)
63 }
64
65 fun Product.getProductDetailValue(key: String): String = this.productDetails?.find { it.key == key }?.value ?: ""
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_benefits_hub/src/main/java/com/sharecare/realgreen/benefits/utils/BenefitsUtils.kt:68:1Line detected, which is longer than the defined maximum line length in the code style.
65 fun Product.getProductDetailValue(key: String): String = this.productDetails?.find { it.key == key }?.value ?: ""
66
67
68 fun ActionEvent.withCommonParams(title: String, sponsorName: String?) = customParam(RG_BENEFIT, title).customParam(RG_BENEFIT_SPONSOR, sponsorName).customParam(RG_SITE_SECTION, BENEFITS)
69
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_benefits_hub/src/main/java/com/sharecare/realgreen/benefits/view/BenefitsHubFragment.kt:21:1Line detected, which is longer than the defined maximum line length in the code style.
18 import com.sharecare.realgreen.core.navigation.getNavigationController
19 import com.sharecare.realgreen.core.util.NavigatorCoreUtil
20
21 class BenefitsHubFragment : BaseFragment<BenefitsHubPresenter, BenefitsHubFragmentMvpView>(), BenefitsHubFragmentMvpView,
22 FabOverlay {
23 companion object {
24 private const val DESTINATION_ID = "DESTINATION_ID"
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_benefits_hub/src/test/java/com/sharecare/realgreen/benefits/presentation/home/SponsorProductsListFragmentPresenterTest.kt:33:17Line detected, which is longer than the defined maximum line length in the code style.
30 @Before
31 fun init() {
32 presenter = SponsorProductsListPresenter(
33 BenefitsHubMockUtil.ADVOCACYENABLED, BenefitsHubMockUtil.BENEFITFEEDHOOK, SponsorProductsPair(BenefitsHubMockUtil.SPONSOR, listOf(PRODUCT, SECOND_PRODUCT))
34 )
35 presenter?.attachView(mockMvpView)
36 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_benefits_hub/src/test/java/com/sharecare/realgreen/benefits/presentation/multisponsor/MultiSponsorPresenterTest.kt:27:9Line detected, which is longer than the defined maximum line length in the code style.
24
25 @Before
26 fun init() {
27 val array = arrayOf(SponsorProductsPair(BenefitsHubMockUtil.SPONSOR, listOf(PRODUCT, BenefitsHubMockUtil.SECOND_PRODUCT)))
28 presenter = MultiSponsorPresenter(BenefitsHubMockUtil.BENEFITFEEDHOOK, array)
29 presenter?.attachView(mockMvpView)
30 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_benefits_hub/src/test/java/com/sharecare/realgreen/benefits/presentation/multisponsor/MultiSponsorPresenterTest.kt:40:9Line detected, which is longer than the defined maximum line length in the code style.
37 @Test
38 fun openBenefitsScreenTest() {
39 presenter!!.openBenefitsScreen("name")
40 Mockito.verify<SponsorsListView>(mockMvpView).gotoBenefitsHomeScreen(BenefitsHubMockUtil.BENEFITFEEDHOOK, SponsorProductsPair(BenefitsHubMockUtil.SPONSOR, listOf(PRODUCT, BenefitsHubMockUtil.SECOND_PRODUCT)))
41 }
42 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_benefits_hub/src/test/java/com/sharecare/realgreen/benefits/presentation/profile/BenefitsProfilePresenterTest.kt:32:13Line detected, which is longer than the defined maximum line length in the code style.
29
30 private var product = Product("product", SPONSORED_KEY,
31 "", "", false, "123", "", "", null,
32 listOf(ProductDetail(CTA_KEY, "https://www.sharecare.com"), ProductDetail(DESCRIPTION, "Genera"), ProductDetail(LOGO_KEY, image),
33 ProductDetail(EXTERNALLINK_KEY, "genera.com"), ProductDetail(PHONE_KEY, phoneNumber), ProductDetail(EMAIL_KEY, email)))
34
35 @Test
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_benefits_hub/src/test/java/com/sharecare/realgreen/benefits/presentation/profile/BenefitsProfilePresenterTest.kt:33:21Line detected, which is longer than the defined maximum line length in the code style.
30 private var product = Product("product", SPONSORED_KEY,
31 "", "", false, "123", "", "", null,
32 listOf(ProductDetail(CTA_KEY, "https://www.sharecare.com"), ProductDetail(DESCRIPTION, "Genera"), ProductDetail(LOGO_KEY, image),
33 ProductDetail(EXTERNALLINK_KEY, "genera.com"), ProductDetail(PHONE_KEY, phoneNumber), ProductDetail(EMAIL_KEY, email)))
34
35 @Test
36 fun init() {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_finddoctor/src/main/java/com/sharecare/realgreen/finddoctor/FindDoctorNavigator.kt:42:9Line detected, which is longer than the defined maximum line length in the code style.
39 .toString()
40 }
41
42 NavigatorCoreUtil.toWebPage(activity, careTeamSearchUrl, isTrackingSiteExit = false, forceAuthWrap = true, replaceContainer = replaceContainer)
43 }
44
45 @JvmStatic
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_finddoctor/src/main/java/com/sharecare/realgreen/finddoctor/FindDoctorNavigator.kt:63:5Line detected, which is longer than the defined maximum line length in the code style.
60 }
61
62 @JvmStatic
63 fun toDetailsWebActivity(activity: Activity, npi: String, isCareTeam: Boolean, isPCP: Boolean, dependentId: String? = null) {
64 val careTeamDetailsUrl = ConfigurationManager().getConfiguration().getNetworkConfiguration()
65 .getPath(NetworkConfigurationType.FIND_A_DOCTOR, SERVICE_CONFIG_FAD_DETAILS_PATH)!! + npi
66
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_finddoctor/src/main/java/com/sharecare/realgreen/finddoctor/model/DialogInformation.kt:19:5Line detected, which is longer than the defined maximum line length in the code style.
16 return isPrimary!!
17 }
18
19 fun buidAddress(locationName: String, street: String, city: String, lat: String, long: String, stateZip : String): DialogInformation {
20 var address = Address.build(locationName, street, city, lat, long, stateZip)
21 this.address = address
22 return this
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_finddoctor/src/main/java/com/sharecare/realgreen/finddoctor/model/DialogInformation.kt:69:13Line detected, which is longer than the defined maximum line length in the code style.
66 var long: String? = null
67
68 companion object {
69 fun build(locationName: String, street: String, city: String, lat: String, long: String, stateZip : String): Address {
70 var address = Address()
71 address.locationName = locationName
72 address.city = city
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_finddoctor/src/main/java/com/sharecare/realgreen/finddoctor/util/DoctorViewUtil.kt:31:5Line detected, which is longer than the defined maximum line length in the code style.
28 .setActionTextColor(ContextCompat.getColor(context, R.color.textButton_snackbar))
29
30 @JvmStatic
31 fun showNoConnectionMessage(fragment: Fragment, context: Context, closeButtonListener: View.OnClickListener): Snackbar {
32 return fragment.showMessage(context.getString(R.string.care_team_offline_message), context.getString(R
33 .string.btn_care_team_offline_message_close),
34 closeButtonListener, Snackbar.LENGTH_LONG, R.color.textButton_snackbar)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_finddoctor/src/main/java/com/sharecare/realgreen/finddoctor/util/DoctorViewUtil.kt:39:9Line detected, which is longer than the defined maximum line length in the code style.
36
37 @JvmStatic
38 fun showNoConnectionMessage(activity: Activity, context: Context, rootView: View): Snackbar {
39 return activity.showMessage(R.color.type_snackbar, context.getString(R.string.care_team_offline_message), context.getString(R
40 .string.btn_care_team_offline_message_close),
41 View.OnClickListener {
42 // No action need here
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_medication/src/main/java/com/sharecare/realgreen/feature_medication/presenter/PHRMedicationDetailsPresenter.kt:24:45Line detected, which is longer than the defined maximum line length in the code style.
21
22
23 class PHRMedicationDetailsPresenter(protected val medicationConfigurationRepository: MedicationConfigurationRepository =
24 MedicationConfigurationDataRepository(ConfigurationRepositoryImpl.provideToExternalModule()),
25 dependentId: String? = null) : PHRSectionPresenter<IPHRMedicationDetailsView>(dependentId) {
26
27 override fun onViewAttached() {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_medication/src/main/java/com/sharecare/realgreen/feature_medication/presenter/PHRMedicationDetailsPresenter.kt:25:37Line detected, which is longer than the defined maximum line length in the code style.
22
23 class PHRMedicationDetailsPresenter(protected val medicationConfigurationRepository: MedicationConfigurationRepository =
24 MedicationConfigurationDataRepository(ConfigurationRepositoryImpl.provideToExternalModule()),
25 dependentId: String? = null) : PHRSectionPresenter<IPHRMedicationDetailsView>(dependentId) {
26
27 override fun onViewAttached() {
28 super.onViewAttached()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_medication/src/main/java/com/sharecare/realgreen/feature_medication/presenter/PHRMedicationDetailsPresenter.kt:51:13Line detected, which is longer than the defined maximum line length in the code style.
48 prepareMedicationDetailsData(medicationSection, usersNotes)
49
50 when (useCase) {
51 UpdateMedicationDetailsDataUseCase.POP_CURRENT_FRAGMENT -> updateMedicationDetailsFragmentWasPopCase(medicationSection,
52 usersNotes, isTracked, dosage)
53 UpdateMedicationDetailsDataUseCase.TO_NEXT_FRAGMENT -> updateMedicationDetailsGoToNextPageCase(medicationSection,
54 usersNotes, isTracked, dosage)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_medication/src/main/java/com/sharecare/realgreen/feature_medication/presenter/PHRMedicationDetailsPresenter.kt:53:13Line detected, which is longer than the defined maximum line length in the code style.
50 when (useCase) {
51 UpdateMedicationDetailsDataUseCase.POP_CURRENT_FRAGMENT -> updateMedicationDetailsFragmentWasPopCase(medicationSection,
52 usersNotes, isTracked, dosage)
53 UpdateMedicationDetailsDataUseCase.TO_NEXT_FRAGMENT -> updateMedicationDetailsGoToNextPageCase(medicationSection,
54 usersNotes, isTracked, dosage)
55 UpdateMedicationDetailsDataUseCase.TO_BACKGROUND -> updateMedicationDetailsToBackGroundCase(medicationSection,
56 isTracked, dosage)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_medication/src/main/java/com/sharecare/realgreen/feature_medication/presenter/PHRMedicationDetailsPresenter.kt:55:13Line detected, which is longer than the defined maximum line length in the code style.
52 usersNotes, isTracked, dosage)
53 UpdateMedicationDetailsDataUseCase.TO_NEXT_FRAGMENT -> updateMedicationDetailsGoToNextPageCase(medicationSection,
54 usersNotes, isTracked, dosage)
55 UpdateMedicationDetailsDataUseCase.TO_BACKGROUND -> updateMedicationDetailsToBackGroundCase(medicationSection,
56 isTracked, dosage)
57 else -> updateMedicationDetailsStandardCase(
58 medicationSection,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_medication/src/main/java/com/sharecare/realgreen/feature_medication/presenter/PHRMedicationDetailsPresenter.kt:95:21Line detected, which is longer than the defined maximum line length in the code style.
92
93 remoteSubscription = repository.modHpMedication(medicationSection.hpRecord!!, dependentId)
94 .doOnSuccess {
95 medicationConfigurationRepository.updateConfigurationQuietly(it.code, isTracked, dosage) //updateConfigurationQuietly
96 deleteItem(existingHpMedicationCode, false)
97 }
98 .withDefaultSchedulers()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_medication/src/main/java/com/sharecare/realgreen/feature_medication/presenter/PHRMedicationDetailsPresenter.kt:189:25Line detected, which is longer than the defined maximum line length in the code style.
186 repository.getCiMedicationsDoseFormStrengths(doseFormCodes)
187 .onErrorReturnItem(emptyList()).withDefaultSchedulers(),
188 Function4<List<CIMedicationDetailResult>, List<CIMedicationImageResult>,
189 List<CIMedicationInfosheetResult>, List<CIMedicationDetailDoseFormStrengthsResult>, List<HPMedicationSection>>
190 { detailsResult, imagesResult, infosheetsResult, doseFormSthrengthsResult ->
191 PHRMedicationUtil.inflateMedicationsSections(detailsResult, imagesResult,
192 infosheetsResult, doseFormSthrengthsResult, listOf(hpMedicationResult))
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_medication/src/main/java/com/sharecare/realgreen/feature_medication/presenter/PHRMedicationDetailsPresenter.kt:199:21Line detected, which is longer than the defined maximum line length in the code style.
196 finishLoadingState()
197 if (it.isNotEmpty()) applyToView { showDetails(it[0]) }
198 }) { e ->
199 switchToErrorState(e, View.OnClickListener { fetchAllExtraData(medicationSection, hpMedicationResult) })
200 }
201 }
202
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_medication/src/main/java/com/sharecare/realgreen/feature_medication/repository/MedicationConfigurationDataRepository.kt:8:1Line detected, which is longer than the defined maximum line length in the code style.
5 import com.sharecare.realgreen.origami.repository.ConfigurationRepository
6 import org.joda.time.DateTime
7
8 class MedicationConfigurationDataRepository(private val trackerConfigurationRepository: ConfigurationRepository) : MedicationConfigurationRepository {
9
10 override fun isTracked(rxCode: String) = trackerConfigurationRepository.getConfigurationSynchronously(DateTime.now())
11 ?.medicationSettingList?.any { it.rxCode.equals(rxCode) } ?: false
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_medication/src/main/java/com/sharecare/realgreen/feature_medication/repository/MedicationConfigurationDataRepository.kt:10:5Line detected, which is longer than the defined maximum line length in the code style.
7
8 class MedicationConfigurationDataRepository(private val trackerConfigurationRepository: ConfigurationRepository) : MedicationConfigurationRepository {
9
10 override fun isTracked(rxCode: String) = trackerConfigurationRepository.getConfigurationSynchronously(DateTime.now())
11 ?.medicationSettingList?.any { it.rxCode.equals(rxCode) } ?: false
12
13 override fun getDosage(rxCode: String) = trackerConfigurationRepository.getConfigurationSynchronously(DateTime.now())
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_medication/src/main/java/com/sharecare/realgreen/feature_medication/repository/MedicationConfigurationDataRepository.kt:13:5Line detected, which is longer than the defined maximum line length in the code style.
10 override fun isTracked(rxCode: String) = trackerConfigurationRepository.getConfigurationSynchronously(DateTime.now())
11 ?.medicationSettingList?.any { it.rxCode.equals(rxCode) } ?: false
12
13 override fun getDosage(rxCode: String) = trackerConfigurationRepository.getConfigurationSynchronously(DateTime.now())
14 ?.medicationSettingList?.find { it.rxCode.equals(rxCode) }?.dosage?.toInt() ?: 1
15
16 override fun updateResetMedicationSettings(code: String?, isTracked: Boolean, dosage: Int, isRecordRemoved: Boolean) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_medication/src/main/java/com/sharecare/realgreen/feature_medication/repository/MedicationConfigurationDataRepository.kt:16:5Line detected, which is longer than the defined maximum line length in the code style.
13 override fun getDosage(rxCode: String) = trackerConfigurationRepository.getConfigurationSynchronously(DateTime.now())
14 ?.medicationSettingList?.find { it.rxCode.equals(rxCode) }?.dosage?.toInt() ?: 1
15
16 override fun updateResetMedicationSettings(code: String?, isTracked: Boolean, dosage: Int, isRecordRemoved: Boolean) {
17 trackerConfigurationRepository.getConfigurationSynchronously(DateTime.now())?.let { configuration ->
18 configuration.medicationSettingList = getMedicationList(configuration.medicationSettingList?.toMutableList(),
19 code, dosage, isTracked, isRecordRemoved)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_medication/src/main/java/com/sharecare/realgreen/feature_medication/repository/MedicationConfigurationDataRepository.kt:18:13Line detected, which is longer than the defined maximum line length in the code style.
15
16 override fun updateResetMedicationSettings(code: String?, isTracked: Boolean, dosage: Int, isRecordRemoved: Boolean) {
17 trackerConfigurationRepository.getConfigurationSynchronously(DateTime.now())?.let { configuration ->
18 configuration.medicationSettingList = getMedicationList(configuration.medicationSettingList?.toMutableList(),
19 code, dosage, isTracked, isRecordRemoved)
20 configuration.shouldResetMedicationSettings = configuration.medicationSettingList.isNullOrEmpty()
21 trackerConfigurationRepository.setConfiguration(configuration)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_medication/src/main/java/com/sharecare/realgreen/feature_medication/repository/MedicationConfigurationDataRepository.kt:55:5Line detected, which is longer than the defined maximum line length in the code style.
52 return medicationSettingList
53 }
54
55 fun updateConfiguration(code: String?, isTracked: Boolean, dosage: Int, isRecordRemoved: Boolean = false) = getConfiguration(code, dosage, isTracked, isRecordRemoved)?.let { configuration ->
56 configuration.shouldResetMedicationSettings = configuration.medicationSettingList.isNullOrEmpty()
57 trackerConfigurationRepository.setConfiguration(configuration)
58 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_medication/src/main/java/com/sharecare/realgreen/feature_medication/screen/PHRMedicationActivity.kt:35:1Line detected, which is longer than the defined maximum line length in the code style.
32 fun setNavigationToolbarVisibility()
33 }
34
35 class PHRMedicationActivity(dependentId: String? = null) : PHRSectionActivity<PHRMedicationPresenter, IPHRMedicationView,
36 PHRSectionMeta>(dependentId), IPHRMedicationView, NavigationSuppressor {
37
38 private lateinit var binding: ActivityPhrMedicationBinding
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_medication/src/main/java/com/sharecare/realgreen/feature_medication/screen/PHRMedicationActivity.kt:42:9Line detected, which is longer than the defined maximum line length in the code style.
39 private var currentRoot: RootDestination = RootDestination.YOU
40
41 override fun interceptNavigationAction(action: NavigationAction): Boolean {
42 if ((action.type == NavigationAction.Type.BACK || action.type == NavigationAction.Type.UP) && (currentRoot == RootDestination.TRACK)) {
43 NavigatorCoreUtil.medicationTrackerNavigator.toMedicationTrackerActivity(requireActivity(), DateTime.now())
44 return true
45 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_medication/src/main/java/com/sharecare/realgreen/feature_medication/screen/PHRMedicationActivity.kt:111:9Line detected, which is longer than the defined maximum line length in the code style.
108 const val EXTRA_CURRENT_ROOT = "extra_current_root"
109
110 @JvmStatic
111 fun makeInstance(medicationSection: HPMedicationSection, currentRoot: RootDestination, dependentId: String? = null) = PHRMedicationActivity(dependentId).apply {
112 arguments = Bundle().apply {
113 putSerializable(EXTRA_PHR_DATA, medicationSection)
114 putSerializable(EXTRA_PHR_SECTION_META, PHRSectionMeta.MEDICATIONS)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_medication/src/main/java/com/sharecare/realgreen/feature_medication/screen/PHRMedicationDetailsActivity.kt:43:1Line detected, which is longer than the defined maximum line length in the code style.
40 fun goUp()
41 }
42
43 class PHRMedicationDetailsActivity(dependentId: String? = null) : PHRSectionActivity<PHRMedicationDetailsPresenter, IPHRMedicationDetailsView, PHRSectionMeta>(dependentId), IPHRMedicationDetailsView, NavigationSuppressor {
44 private lateinit var binding: FragmentPhrMedicationDetailsBinding
45 private lateinit var notesEdit: TextInputEditText
46 private var currentSelectedDosageInPicker = 1
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_medication/src/main/java/com/sharecare/realgreen/feature_medication/screen/PHRMedicationDetailsActivity.kt:358:5Line detected, which is longer than the defined maximum line length in the code style.
355 }
356 }
357
358 private fun getCurrentStrengthValue(ciMedicationDetailDoseFormStrengthsData: List<CIMedicationForm>?): HPMedicationStrength? {
359 return PHRMedicationUtil.getCIMedicationForm(
360 ciMedicationDetailDoseFormStrengthsData,
361 binding.medicationFormValue.text.toString()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_medication/src/main/java/com/sharecare/realgreen/feature_medication/screen/PHRMedicationDetailsActivity.kt:374:9Line detected, which is longer than the defined maximum line length in the code style.
371 val strengthListInPicker = getStrengthList(ciMedicationForm)
372
373 currentSelectedStrengthInPicker = 0
374 binding.medicationStrengthValue.text = strengthListInPicker.getOrNull(0) ?: getString(R.string.phr_medication_unspecified)
375 updateStrengthAction(ciMedicationForm, ciMedicationDetailDoseFormStrengthsData)
376 }
377
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_medication/src/main/java/com/sharecare/realgreen/feature_medication/screen/PHRMedicationDetailsActivity.kt:378:5Line detected, which is longer than the defined maximum line length in the code style.
375 updateStrengthAction(ciMedicationForm, ciMedicationDetailDoseFormStrengthsData)
376 }
377
378 private fun updateStrengthAction(ciMedicationForm: CIMedicationForm?, ciMedicationDetailDoseFormStrengthsData: List<CIMedicationForm>?){
379 val strengthListInPicker = getStrengthList(ciMedicationForm)
380
381 if (strengthListInPicker.isEmpty()) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_notificationcenter/src/main/java/com/sharecare/realgreen/notificationcenter/NotificationCenter.kt:27:9Line detected, which is longer than the defined maximum line length in the code style.
24 ExternalServices.register(ServiceFactory.ServiceType.NOTIFICATION_CENTER, object : FeingoldServiceCreator {
25 override fun createService(params: FeingoldServiceParams) = NotificationCenterService(params)
26 })
27 ParsingUtil.registerExternalDeserializer(NotificationActualResponse::class.java, NotificationResponseDeserializer())
28 if (component == null) {
29 component = DaggerNotificationCenterDiComponent.builder()
30 .notificationCenterDiModule(NotificationCenterDiModule(context))
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_notificationcenter/src/main/java/com/sharecare/realgreen/notificationcenter/presentation/bell/NotificationsBellView.kt:57:9Line detected, which is longer than the defined maximum line length in the code style.
54
55 companion object {
56 @JvmStatic
57 fun isFeatureSupported() = ConfigurationManager().getConfiguration().isFeatureEnabled(FeatureToggleType.NOTIFICATION_CENTER)
58 }
59 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_notificationcenter/src/main/java/com/sharecare/realgreen/notificationcenter/presentation/list/ui/NotificationCenterFragment.kt:36:1Line detected, which is longer than the defined maximum line length in the code style.
33 import io.realm.OrderedCollectionChangeSet
34 import io.realm.RealmResults
35
36 class NotificationCenterFragment : BaseMvpFragment<NotificationCenterPresenter, NotificationCenterView>(), NotificationCenterView {
37
38 override fun createPresenter() = NotificationCenterPresenter(NotificationAttributes.wasStartedByPush(this))
39
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_notificationcenter/src/main/java/com/sharecare/realgreen/notificationcenter/presentation/list/ui/NotificationCenterFragment.kt:51:13Line detected, which is longer than the defined maximum line length in the code style.
48 override fun onCreate(savedInstanceState: Bundle?) {
49 super.onCreate(savedInstanceState)
50 if (NetworkUtil.isNetworkAvailable(requireContext())) {
51 SocketConnection.registerForSocketConnection(lifecycle, EventType.NOTIFICATIONS_NEW, object : ClientWebSocket.MessageListener {
52 override fun onSocketMessage(message: String?, params: JsonElement?) {
53 activity!!.runOnUiThread {
54 if (isScrollPositionAtTop()) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_notificationcenter/src/main/java/com/sharecare/realgreen/notificationcenter/presentation/list/ui/NotificationCenterFragment.kt:82:9Line detected, which is longer than the defined maximum line length in the code style.
79 binding.items.layoutManager = LinearLayoutManager(context)
80 binding.items.addItemDecoration(DividerItemDecoration(context, DividerItemDecoration.VERTICAL))
81
82 initPullToRefreshComponent(binding.swipeRefreshLayout, SwipeRefreshLayout.OnRefreshListener { presenter.onPullToRefresh() })
83
84 binding.markAll.setOnClickListener {
85 onMarkAllAsRead()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_notificationcenter/src/main/java/com/sharecare/realgreen/notificationcenter/presentation/list/ui/NotificationCenterFragment.kt:141:13Line detected, which is longer than the defined maximum line length in the code style.
138 showMessage(when (message) {
139 NotificationCenterView.Message.MARK_ALL_AS_READ_SUCCESS -> R.string.notification_center_mark_all_result_ok
140 NotificationCenterView.Message.MARK_ALL_AS_READ_FAILURE -> R.string.notification_center_mark_all_result_fail
141 NotificationCenterView.Message.DELETE_NOTIFICATION_FAILURE -> R.string.notification_center_delete_notification_fail
142 NotificationCenterView.Message.DELETE_NOTIFICATION_SUCCESS -> R.string.notification_center_delete_notification_ok
143 NotificationCenterView.Message.ERROR_SOMETHING_WENT_WRONG -> R.string.something_went_wrong
144 })
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_notificationcenter/src/main/java/com/sharecare/realgreen/notificationcenter/presentation/list/ui/NotificationCenterFragment.kt:142:13Line detected, which is longer than the defined maximum line length in the code style.
139 NotificationCenterView.Message.MARK_ALL_AS_READ_SUCCESS -> R.string.notification_center_mark_all_result_ok
140 NotificationCenterView.Message.MARK_ALL_AS_READ_FAILURE -> R.string.notification_center_mark_all_result_fail
141 NotificationCenterView.Message.DELETE_NOTIFICATION_FAILURE -> R.string.notification_center_delete_notification_fail
142 NotificationCenterView.Message.DELETE_NOTIFICATION_SUCCESS -> R.string.notification_center_delete_notification_ok
143 NotificationCenterView.Message.ERROR_SOMETHING_WENT_WRONG -> R.string.something_went_wrong
144 })
145 if (message == NotificationCenterView.Message.MARK_ALL_AS_READ_SUCCESS) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_notificationcenter/src/main/java/com/sharecare/realgreen/notificationcenter/presentation/list/ui/NotificationViewHolder.kt:12:30Line detected, which is longer than the defined maximum line length in the code style.
9 import com.sharecare.realgreen.notificationcenter.databinding.ItemNotificationCenterBinding
10
11 class NotificationViewHolder(private val binding: ItemNotificationCenterBinding,
12 private val deletionListener: ItemDeletionClickListener) : BindableViewHolder<OfflineNotification>(binding.root, binding.itemItself) {
13
14 private lateinit var actualItem: OfflineNotification
15
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_notificationcenter/src/main/java/com/sharecare/realgreen/notificationcenter/presentation/list/ui/NotificationsAdapter.kt:66:9Line detected, which is longer than the defined maximum line length in the code style.
63
64 override fun onCreateViewHolder(parent: ViewGroup): NotificationViewHolder {
65 val inflater = LayoutInflater.from(parent.context)
66 val binding = DataBindingUtil.inflate<ItemNotificationCenterBinding>(inflater, R.layout.item_notification_center, parent, false)
67 return NotificationViewHolder(binding, deletionListener)
68 }
69
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_notificationcenter/src/main/java/com/sharecare/realgreen/notificationcenter/service/NotificationCenterService.kt:19:1Line detected, which is longer than the defined maximum line length in the code style.
16 import retrofit2.http.Path
17 import retrofit2.http.Query
18
19 class NotificationCenterService(params: FeingoldServiceParams) : FeingoldService(params, NetworkConfigurationType.NOTIFICATION_CENTER), NotificationCenterServiceInterface {
20 override fun getServiceType() = ServiceFactory.ServiceType.NOTIFICATION_CENTER
21
22 private fun getProxy() = createService(NotificationCenterServiceInterface::class.java)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_notificationcenter/src/main/java/com/sharecare/realgreen/notificationcenter/service/NotificationResponseDeserializer.kt:13:5Line detected, which is longer than the defined maximum line length in the code style.
10
11 class NotificationResponseDeserializer : JsonDeserializer<NotificationActualResponse> {
12
13 override fun deserialize(json: JsonElement?, typeOfT: Type?, context: JsonDeserializationContext?): NotificationActualResponse {
14 val notificationItems = (json as? JsonObject)?.getAsJsonArray("notifications")?.mapNotNull {
15 context!!.deserialize<NotificationResponse>(it, NotificationResponse::class.java).takeIf { notificationResponseItem ->
16 with(notificationResponseItem.content.body.attributes) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_notificationcenter/src/main/java/com/sharecare/realgreen/notificationcenter/service/NotificationResponseDeserializer.kt:15:13Line detected, which is longer than the defined maximum line length in the code style.
12
13 override fun deserialize(json: JsonElement?, typeOfT: Type?, context: JsonDeserializationContext?): NotificationActualResponse {
14 val notificationItems = (json as? JsonObject)?.getAsJsonArray("notifications")?.mapNotNull {
15 context!!.deserialize<NotificationResponse>(it, NotificationResponse::class.java).takeIf { notificationResponseItem ->
16 with(notificationResponseItem.content.body.attributes) {
17 //Yes we want to check if the fields are not null, server can return null and Gson will initialize our model with null
18 body.isNullOrEmpty().not() && url.isNullOrEmpty().not()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_notificationcenter/src/main/java/com/sharecare/realgreen/notificationcenter/service/NotificationResponseDeserializer.kt:17:21Line detected, which is longer than the defined maximum line length in the code style.
14 val notificationItems = (json as? JsonObject)?.getAsJsonArray("notifications")?.mapNotNull {
15 context!!.deserialize<NotificationResponse>(it, NotificationResponse::class.java).takeIf { notificationResponseItem ->
16 with(notificationResponseItem.content.body.attributes) {
17 //Yes we want to check if the fields are not null, server can return null and Gson will initialize our model with null
18 body.isNullOrEmpty().not() && url.isNullOrEmpty().not()
19 }
20 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_notificationcenter/src/main/java/com/sharecare/realgreen/notificationcenter/util/UnseenCounterUpdater.kt:19:13Line detected, which is longer than the defined maximum line length in the code style.
16
17 fun doItsJob() {
18 try {
19 val service = ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.NOTIFICATION_CENTER) as NotificationCenterService
20 val newUnseenCount = service.getUnseenCount().numPending
21 settings.seenCount = newUnseenCount
22 } catch (e: Exception) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/main/java/com/sharecare/onboarding/domain/repositories/login/LoginRepositoryImpl.kt:33:5Line detected, which is longer than the defined maximum line length in the code style.
30
31 override fun deleteItemsInDatabase() = RealmTransaction.execute { realm -> realm.delete(ItemRecord::class.java) }
32
33 override fun getConfigurations(email: String) = RxWrapperUtil.create { ConfigurationManager().requestAndSaveConfiguration(email) }
34
35 override suspend fun login(email: String, password: String) = withContext(Dispatchers.IO) {
36 mfaRepository.resetMfa()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/main/java/com/sharecare/onboarding/domain/repositories/login/LoginRepositoryImpl.kt:52:5Line detected, which is longer than the defined maximum line length in the code style.
49 return@withContext ticket
50 }
51
52 override suspend fun loginWithRecoveryCode(email: String, recoveryCode: String, redirectUrl: String): Ticket? = withContext(Dispatchers.IO) {
53 mfaRepository.resetMfa()
54 val ticket = ssoService().refreshTicketFromRecovery(
55 RecoveryCodeRequest(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/main/java/com/sharecare/onboarding/domain/repositories/mfa/MfaFlowError.kt:10:5Line detected, which is longer than the defined maximum line length in the code style.
7 object InvalidToken : MfaFlowError("invalid token", code = ErrorCode.MFA_TOKEN_INVALID)
8 object InvalidOtp : MfaFlowError("invalid top", code = ErrorCode.MFA_OTP_INVALID)
9 object ExpiredOtp : MfaFlowError("otp expired", code = ErrorCode.MFA_OTP_EXPIRED)
10 object TooManyMfaCodeRequest : MfaFlowError("If max mfa_attempts are reached. Invalidates mfa_token", code = ErrorCode.MFA_EXCESSIVE_REQUESTS)
11 object TooManyMfaCodeSubmits : MfaFlowError("Mfa code submitted to often. A 10min wait is now enforced", code = ErrorCode.MFA_EXCESSIVE_SUBMITS)
12 object ServerIssue : MfaFlowError("any internal service error", code = ErrorCode.MFA_INTERNAL_SERVICE_ERROR)
13 object MalformedOtp : MfaFlowError("Input error - The entered OTP is empty or less than 6 chars", code = ErrorCode.MFA_INTERNAL_SERVICE_ERROR)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/main/java/com/sharecare/onboarding/domain/repositories/mfa/MfaFlowError.kt:11:5Line detected, which is longer than the defined maximum line length in the code style.
8 object InvalidOtp : MfaFlowError("invalid top", code = ErrorCode.MFA_OTP_INVALID)
9 object ExpiredOtp : MfaFlowError("otp expired", code = ErrorCode.MFA_OTP_EXPIRED)
10 object TooManyMfaCodeRequest : MfaFlowError("If max mfa_attempts are reached. Invalidates mfa_token", code = ErrorCode.MFA_EXCESSIVE_REQUESTS)
11 object TooManyMfaCodeSubmits : MfaFlowError("Mfa code submitted to often. A 10min wait is now enforced", code = ErrorCode.MFA_EXCESSIVE_SUBMITS)
12 object ServerIssue : MfaFlowError("any internal service error", code = ErrorCode.MFA_INTERNAL_SERVICE_ERROR)
13 object MalformedOtp : MfaFlowError("Input error - The entered OTP is empty or less than 6 chars", code = ErrorCode.MFA_INTERNAL_SERVICE_ERROR)
14 object EmptyOtp : MfaFlowError("Input error - The entered OTP is empty or less than 6 chars", code = ErrorCode.MFA_INTERNAL_SERVICE_ERROR)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/main/java/com/sharecare/onboarding/domain/repositories/mfa/MfaFlowError.kt:13:5Line detected, which is longer than the defined maximum line length in the code style.
10 object TooManyMfaCodeRequest : MfaFlowError("If max mfa_attempts are reached. Invalidates mfa_token", code = ErrorCode.MFA_EXCESSIVE_REQUESTS)
11 object TooManyMfaCodeSubmits : MfaFlowError("Mfa code submitted to often. A 10min wait is now enforced", code = ErrorCode.MFA_EXCESSIVE_SUBMITS)
12 object ServerIssue : MfaFlowError("any internal service error", code = ErrorCode.MFA_INTERNAL_SERVICE_ERROR)
13 object MalformedOtp : MfaFlowError("Input error - The entered OTP is empty or less than 6 chars", code = ErrorCode.MFA_INTERNAL_SERVICE_ERROR)
14 object EmptyOtp : MfaFlowError("Input error - The entered OTP is empty or less than 6 chars", code = ErrorCode.MFA_INTERNAL_SERVICE_ERROR)
15 object UndefinedIssue : MfaFlowError("undefined", code = ErrorCode.UNHANDLED)
16
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/main/java/com/sharecare/onboarding/domain/repositories/mfa/MfaFlowError.kt:14:5Line detected, which is longer than the defined maximum line length in the code style.
11 object TooManyMfaCodeSubmits : MfaFlowError("Mfa code submitted to often. A 10min wait is now enforced", code = ErrorCode.MFA_EXCESSIVE_SUBMITS)
12 object ServerIssue : MfaFlowError("any internal service error", code = ErrorCode.MFA_INTERNAL_SERVICE_ERROR)
13 object MalformedOtp : MfaFlowError("Input error - The entered OTP is empty or less than 6 chars", code = ErrorCode.MFA_INTERNAL_SERVICE_ERROR)
14 object EmptyOtp : MfaFlowError("Input error - The entered OTP is empty or less than 6 chars", code = ErrorCode.MFA_INTERNAL_SERVICE_ERROR)
15 object UndefinedIssue : MfaFlowError("undefined", code = ErrorCode.UNHANDLED)
16
17 companion object {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/main/java/com/sharecare/onboarding/domain/repositories/mfa/MfaPreferenceStore.kt:9:1Line detected, which is longer than the defined maximum line length in the code style.
6 import com.sharecare.realgreen.core.architecture.di.appContext
7 import com.sharecare.realgreen.core.architecture.di.koin.inject
8
9 class MfaPreferenceStore(private val context: Context = appContext(), private val params: OnboardingParams = OnboardingParams::class.inject()) {
10
11 private fun preferences(): SharedPreferences = context.getSharedPreferences(params.mfaSharedPrefsFileName, Context.MODE_PRIVATE)
12
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/main/java/com/sharecare/onboarding/domain/repositories/mfa/MfaPreferenceStore.kt:11:5Line detected, which is longer than the defined maximum line length in the code style.
8
9 class MfaPreferenceStore(private val context: Context = appContext(), private val params: OnboardingParams = OnboardingParams::class.inject()) {
10
11 private fun preferences(): SharedPreferences = context.getSharedPreferences(params.mfaSharedPrefsFileName, Context.MODE_PRIVATE)
12
13 fun setDeviceKey(email: String, key: String) {
14 preferences().edit()?.putString(makeKeyFileId(email), key)?.apply()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/main/java/com/sharecare/onboarding/domain/repositories/mfa/MfaRepositoryImpl.kt:45:9Line detected, which is longer than the defined maximum line length in the code style.
42 override suspend fun enableMfa(channels: List<MfaChannelItem>, token: String?, email: String) {
43 i("MFA: Enabling multi factor authentication for ${channels.size} channels..")
44 if (channels.isEmpty()) throw Exception("At least on MFA channel item is required to activate MFA.")
45 stateFlow.emit(stateFlow.value.copy(status = MfaStatus.Pending, mfaChannels = channels, mfaToken = token, loginEmail = email))
46 }
47
48 override suspend fun requestMfaCode(channel: MfaChannel): Any = withContext(Dispatchers.IO) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/main/java/com/sharecare/onboarding/domain/repositories/mfa/MfaRepositoryImpl.kt:78:17Line detected, which is longer than the defined maximum line length in the code style.
75 try {
76 stateFlow.emit(stateFlow.value.copy(status = MfaStatus.Requested))
77 with(stateFlow.value) {
78 val ticket:Ticket = mfaService().putMfaVerificationCode(MfaSubmitRequest(mfaToken = mfaToken!!, otp = code, mfaChannel = channel))
79 PreferenceStore.setUserEmailSetting(stateFlow.value.loginEmail!!)
80 i("MFA code validation was successful")
81 val deviceId = requestDeviceId(ticket.accountId!!)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/main/java/com/sharecare/onboarding/domain/repositories/missingfields/MissingFieldsApiRepositoryImpl.kt:24:21Line detected, which is longer than the defined maximum line length in the code style.
21 return@withContext when {
22 result == null -> null
23 !isVersionSupported(result) -> {
24 w("Missing fields result of type ${result.type()} expected a version (expected = ${result.version()}) exceeding the app's support level ${globalParams.onboardingVersion}")
25 null
26 }
27 else -> result
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/main/java/com/sharecare/onboarding/domain/services/MfaServiceImpl.kt:26:9Line detected, which is longer than the defined maximum line length in the code style.
23 get() = params.appConfiguration.getNetworkConfiguration().getHostForFeature(NetworkConfigurationType.AUTH)
24
25 private val basicAuth: String?
26 get() = params.appConfiguration.getNetworkConfiguration().getAuthorizationForFeature(NetworkConfigurationType.AUTH)
27
28 private val ssoService: SSOService
29 get() = createService(authUrl, basicAuth, SSOService::class.java)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/main/java/com/sharecare/onboarding/ui/screens/mfa/MfaSubmissionFragment.kt:130:17Line detected, which is longer than the defined maximum line length in the code style.
127 removeAllViews()
128 new.mfaChannels.forEach { channelItem ->
129 val itemView = ItemMfaChannelBinding.inflate(LayoutInflater.from(root.context))
130 val params = FrameLayout.LayoutParams(RadioGroup.LayoutParams.MATCH_PARENT, RadioGroup.LayoutParams.WRAP_CONTENT)
131 params.leftMargin = resources.getDimensionPixelSize(R.dimen.spacing_m)
132 params.rightMargin = resources.getDimensionPixelSize(R.dimen.spacing_m)
133 itemView.layout.layoutParams = params
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/main/java/com/sharecare/onboarding/ui/screens/mfa/MfaSubmissionFragment.kt:156:9Line detected, which is longer than the defined maximum line length in the code style.
153 }
154 requestError.visible = new.requestIssue != null
155 requestError.text = new.requestIssue
156 btnContinue.btnWidget.text = if (btnContinue.btnLoadingIndicator.visible) "" else context.getString(R.string.onboarding_mfa_continue)
157
158 }
159
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/main/java/com/sharecare/onboarding/ui/screens/mfa/MfaVerificationFragment.kt:62:17Line detected, which is longer than the defined maximum line length in the code style.
59 override fun attachEvents() = flowEvents(vm) {
60 onEvent { event ->
61 when (event) {
62 MfaEvents.NewMfaCodeSent -> showMessage(R.string.onboarding_mfa_verify_code_msg_new_code, lengthLong = false)
63 else -> missingEventImpl(event)
64 }
65 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/main/java/com/sharecare/onboarding/ui/screens/mfa/MfaVerificationFragment.kt:119:9Line detected, which is longer than the defined maximum line length in the code style.
116 status.text = state.validationIssue
117 ?: context.getString(R.string.onboarding_mfa_verify_code_expiration)
118 switchChannelBtn.isVisible = state.mfaChannels.size > 1
119 status.setTextColor(if (state.validationIssue == null) root.context.getColor(R.color.medium) else root.context.getColor(R.color.alert))
120 newCodeLoading.visible = state.phase == ScreenPhase.Loading && state.status == MfaStatus.Pending
121 newCodeTextBtn.visible = !newCodeLoading.isVisible
122 btnContinue.btnLoadingIndicator.visible = state.phase == ScreenPhase.Loading && state.status != MfaStatus.Pending
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/main/java/com/sharecare/onboarding/ui/screens/mfa/MfaVerificationFragment.kt:122:9Line detected, which is longer than the defined maximum line length in the code style.
119 status.setTextColor(if (state.validationIssue == null) root.context.getColor(R.color.medium) else root.context.getColor(R.color.alert))
120 newCodeLoading.visible = state.phase == ScreenPhase.Loading && state.status == MfaStatus.Pending
121 newCodeTextBtn.visible = !newCodeLoading.isVisible
122 btnContinue.btnLoadingIndicator.visible = state.phase == ScreenPhase.Loading && state.status != MfaStatus.Pending
123 btnContinue.btnWidget.text = if (btnContinue.btnLoadingIndicator.visible) "" else context.getString(R.string.onboarding_mfa_verify_code_verify)
124 }
125 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/main/java/com/sharecare/onboarding/ui/screens/mfa/MfaVerificationFragment.kt:123:9Line detected, which is longer than the defined maximum line length in the code style.
120 newCodeLoading.visible = state.phase == ScreenPhase.Loading && state.status == MfaStatus.Pending
121 newCodeTextBtn.visible = !newCodeLoading.isVisible
122 btnContinue.btnLoadingIndicator.visible = state.phase == ScreenPhase.Loading && state.status != MfaStatus.Pending
123 btnContinue.btnWidget.text = if (btnContinue.btnLoadingIndicator.visible) "" else context.getString(R.string.onboarding_mfa_verify_code_verify)
124 }
125 }
126
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/main/java/com/sharecare/onboarding/ui/screens/mfa/MfaViewModelImpl.kt:99:17Line detected, which is longer than the defined maximum line length in the code style.
96 if (state.selectedMfaChannel != null) {
97 i("On continue MFA verification with channel ${state.selectedMfaChannel}")
98 try {
99 state = state.copy(requestIssue = null, phase = ScreenPhase.Loading, status = MfaStatus.Pending, validationIssue = null)
100 mfaRepository.requestMfaCode(state.selectedMfaChannel!!)
101 //on success
102 state = state.copy(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/main/java/com/sharecare/onboarding/ui/screens/mfa/MfaViewModelImpl.kt:110:29Line detected, which is longer than the defined maximum line length in the code style.
107 } catch (e: MfaFlowError) {
108 state = state.copy(
109 requestIssue = when (e) {
110 is MfaFlowError.InvalidToken -> appContext().getString(R.string.onboarding_mfa_error_invalid_token)
111 is MfaFlowError.TooManyMfaCodeRequest -> ""
112 else -> appContext().getString(R.string.onboarding_unspecified_error)
113 },
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/main/java/com/sharecare/onboarding/ui/screens/mfa/MfaViewModelImpl.kt:118:17Line detected, which is longer than the defined maximum line length in the code style.
115 navigation = if (e is MfaFlowError.TooManyMfaCodeRequest) e.asNavigationItem() else null
116 )
117 } catch (e: Exception) {
118 state = state.copy(requestIssue = appContext().getString(R.string.onboarding_unspecified_error), phase = ScreenPhase.Normal)
119 }
120 } else {
121 state = state.copy(requestIssue = appContext().getString(R.string.onboarding_mfa_request_error_channel_missing))
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/main/java/com/sharecare/onboarding/ui/screens/mfa/MfaViewModelImpl.kt:121:13Line detected, which is longer than the defined maximum line length in the code style.
118 state = state.copy(requestIssue = appContext().getString(R.string.onboarding_unspecified_error), phase = ScreenPhase.Normal)
119 }
120 } else {
121 state = state.copy(requestIssue = appContext().getString(R.string.onboarding_mfa_request_error_channel_missing))
122 w("A MFA channel needs to be selected to continue verification")
123 }
124 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/main/java/com/sharecare/onboarding/ui/screens/phone/OnboardingPhoneCollectState.kt:38:9Line detected, which is longer than the defined maximum line length in the code style.
35
36 fun OnboardingResponse?.toFieldApiData(logger: Logger?): OnboardingPhoneCollectState.FieldApiData {
37 this?.page?.attributes?.apply {
38 val subComponent: Field? = page!!.subcomponents.firstOrNull { component -> component.componentType == "phone_input" }
39 val subComponentAttributes: GeneralFieldAttributes? = subComponent?.attributes
40 if (subComponentAttributes == null || subComponentAttributes.attributes.isNullOrEmpty()) logger?.w("SubComponent attr are null or empty (subComponentType \"phone_input\"")
41 return OnboardingPhoneCollectState.FieldApiData(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/main/java/com/sharecare/onboarding/ui/screens/phone/OnboardingPhoneCollectState.kt:40:9Line detected, which is longer than the defined maximum line length in the code style.
37 this?.page?.attributes?.apply {
38 val subComponent: Field? = page!!.subcomponents.firstOrNull { component -> component.componentType == "phone_input" }
39 val subComponentAttributes: GeneralFieldAttributes? = subComponent?.attributes
40 if (subComponentAttributes == null || subComponentAttributes.attributes.isNullOrEmpty()) logger?.w("SubComponent attr are null or empty (subComponentType \"phone_input\"")
41 return OnboardingPhoneCollectState.FieldApiData(
42 title = title,
43 subtitle = subtitle,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/main/java/com/sharecare/onboarding/ui/screens/phone/OnboardingPhoneCollectViewModelImpl.kt:38:9Line detected, which is longer than the defined maximum line length in the code style.
35 private val phoneRepository: PhoneCollectRepository,
36 params: OnboardingParams,
37 private val analytics: OnboardingAnalytics,
38 override val stateFlow: MutableStateFlow<OnboardingPhoneCollectState> = MutableStateFlow(OnboardingPhoneCollectState()),
39 private val helpers: PhoneCollectionHelpers = PhoneCollectionHelpers(),
40 private val composite: PhoneEncodingViewModelComposite<OnboardingPhoneCollectState> = PhoneEncodingViewModelCompositeImpl(accountRepository, phoneRepository, stateFlow, helpers, params.androidLogger()) { state ->
41 stateFlow.emit(stateFlow.value.copy(phoneEncodingState = state))
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/main/java/com/sharecare/onboarding/ui/screens/phone/OnboardingPhoneCollectViewModelImpl.kt:40:9Line detected, which is longer than the defined maximum line length in the code style.
37 private val analytics: OnboardingAnalytics,
38 override val stateFlow: MutableStateFlow<OnboardingPhoneCollectState> = MutableStateFlow(OnboardingPhoneCollectState()),
39 private val helpers: PhoneCollectionHelpers = PhoneCollectionHelpers(),
40 private val composite: PhoneEncodingViewModelComposite<OnboardingPhoneCollectState> = PhoneEncodingViewModelCompositeImpl(accountRepository, phoneRepository, stateFlow, helpers, params.androidLogger()) { state ->
41 stateFlow.emit(stateFlow.value.copy(phoneEncodingState = state))
42 },
43 ) : BaseViewModel<OnboardingPhoneViewModel<PhoneEncodingState>, OnboardingParams>(params),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/main/java/com/sharecare/onboarding/ui/screens/phone/OnboardingPhoneCollectViewModelImpl.kt:87:17Line detected, which is longer than the defined maximum line length in the code style.
84 if (!state.skipPending) {
85 viewModelScope.launch {
86 state = state.copy(skipPending = true)
87 encodingState = encodingState.copy(phoneEncodingInputError = null, phoneEncodingApiError = null, phoneEncodingRequestActive = true)
88 val successful = onScreenSkipEvent()
89 state = state.copy(skipPending = false)
90 encodingState = if (successful) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/main/java/com/sharecare/onboarding/ui/screens/phone/OnboardingPhoneCollectViewModelImpl.kt:91:21Line detected, which is longer than the defined maximum line length in the code style.
88 val successful = onScreenSkipEvent()
89 state = state.copy(skipPending = false)
90 encodingState = if (successful) {
91 encodingState.copy(phoneEncodingApiError = null, navigation = NavigationConstants.SKIP.asNavigationItem(), phoneEncodingRequestActive = false)
92 } else {
93 encodingState.copy(phoneEncodingApiError = appContext().getString(R.string.onboarding_unspecified_error), phoneEncodingRequestActive = false)
94 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/main/java/com/sharecare/onboarding/ui/screens/phone/OnboardingPhoneCollectViewModelImpl.kt:93:21Line detected, which is longer than the defined maximum line length in the code style.
90 encodingState = if (successful) {
91 encodingState.copy(phoneEncodingApiError = null, navigation = NavigationConstants.SKIP.asNavigationItem(), phoneEncodingRequestActive = false)
92 } else {
93 encodingState.copy(phoneEncodingApiError = appContext().getString(R.string.onboarding_unspecified_error), phoneEncodingRequestActive = false)
94 }
95 }
96 } else w("Skipping already in process")
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/main/java/com/sharecare/onboarding/ui/screens/phone/OnboardingPhoneCollectViewModelImpl.kt:103:13Line detected, which is longer than the defined maximum line length in the code style.
100 try {
101 val numberFormatted = runPhoneNumberValidation(false).first
102 val result = phoneRepository.submitPhoneNumber(numberFormatted)
103 if (result) encodingState = encodingState.copy(navigation = NavigationConstants.SYNC.asNavigationItem(), phoneEncodingRequestActive = false)
104 if (!result) throw IllegalStateException("Phone submission failed - negative result")
105 } catch (e: PhoneNumberError) {
106 analytics.phoneCollectionErrorPhoneVerification()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/main/java/com/sharecare/onboarding/ui/screens/phone/OnboardingPhoneCollectViewModelImpl.kt:108:13Line detected, which is longer than the defined maximum line length in the code style.
105 } catch (e: PhoneNumberError) {
106 analytics.phoneCollectionErrorPhoneVerification()
107 e("Failed to validate number: ${e.message}", e)
108 encodingState = encodingState.copy(phoneEncodingRequestActive = false, phoneEncodingInputError = e.toInputErrorString())
109 } catch (e: Exception) {
110 analytics.phoneCollectionErrorPhoneVerification()
111 e("Failed to confirm number: ${e.message}", e)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/main/java/com/sharecare/onboarding/ui/screens/phone/OnboardingPhoneCollectViewModelImpl.kt:112:13Line detected, which is longer than the defined maximum line length in the code style.
109 } catch (e: Exception) {
110 analytics.phoneCollectionErrorPhoneVerification()
111 e("Failed to confirm number: ${e.message}", e)
112 encodingState = encodingState.copy(phoneEncodingRequestActive = false, phoneEncodingApiError = appContext().getString(com.sharecare.realgreen.core.R.string.phonecollect_unspecified_error))
113 }
114 }
115
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/main/java/com/sharecare/onboarding/ui/screens/phone/PhoneCollectionFragment.kt:45:5Line detected, which is longer than the defined maximum line length in the code style.
42
43 private val args: PhoneCollectionFragmentArgs by navArgs()
44
45 private val vm: OnboardingPhoneViewModel<PhoneEncodingState> by koinNavGraphViewModel<OnboardingPhoneCollectViewModelImpl>(R.id.LaunchGraph)
46
47 override fun attachLayout() = FragmentPhoneCollectBinding.inflate(layoutInflater)
48
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/main/java/com/sharecare/onboarding/ui/screens/phone/PhoneCollectionFragment.kt:52:13Line detected, which is longer than the defined maximum line length in the code style.
49 override fun onCreate(savedInstanceState: Bundle?) {
50 try {
51 super.onCreate(savedInstanceState)
52 args.data?.let { vm.onScreenInit(it) } //when navigating to this screen initially. Make sure to provide a non-null data argument.
53 analytics.phoneCollectionPageView()
54 } catch (e: Exception) {
55 e("Failed to init phone collection fragment", e)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/main/java/com/sharecare/onboarding/ui/screens/phone/PhoneCollectionFragment.kt:66:17Line detected, which is longer than the defined maximum line length in the code style.
63 when (destination) {
64 NavigationConstants.SKIP -> navigator.navToSync()
65 NavigationConstants.SYNC -> navigator.navToSync()
66 PhoneEncodingSelectionView::class -> navigator.navigate(PhoneCollectionFragmentDirections.toCountrySelection())
67 else -> missingNavigation(destination)
68 }
69 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/main/java/com/sharecare/onboarding/ui/screens/phone/PhoneCollectionFragment.kt:112:9Line detected, which is longer than the defined maximum line length in the code style.
109 scrollable.isVisible = state.phase != ScreenPhase.Loading
110 encodingInput.clearFocus()
111 requestError.textOrGone = state.phoneEncodingApiError
112 if (old?.phoneEncodingApiError == null && state.phoneEncodingApiError != null) scrollable.post { scrollable.fullScroll(View.FOCUS_DOWN) }
113 phoneContainer.error = state.phoneEncodingInputError
114 encodingInput.setText(state.phoneEncodingSelection?.displayText())
115 skipBtn.isVisible = state.apiData.allowSkip
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/main/java/com/sharecare/onboarding/ui/screens/phone/PhoneCountrySearchFragment.kt:26:5Line detected, which is longer than the defined maximum line length in the code style.
23 params = GlobalParams::class.inject(),
24 ), PhoneEncodingSearchView {
25
26 private val vm: OnboardingPhoneViewModel<PhoneEncodingState> by koinNavGraphViewModel<OnboardingPhoneCollectViewModelImpl>(R.id.LaunchGraph)
27
28 override fun attachLayout() = FragmentPhoneCodeSearchBinding.inflate(layoutInflater)
29
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/main/java/com/sharecare/onboarding/ui/screens/phone/PhoneCountrySelectionFragment.kt:24:5Line detected, which is longer than the defined maximum line length in the code style.
21 params = OnboardingParams::class.inject(),
22 ), PhoneEncodingSelectionView {
23
24 private val vm: OnboardingPhoneViewModel<PhoneEncodingState> by koinNavGraphViewModel<OnboardingPhoneCollectViewModelImpl>(R.id.LaunchGraph)
25
26 override fun attachLayout() = FragmentPhoneCodeSelectBinding.inflate(layoutInflater)
27
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/test/java/com/sharecare/onboarding/UtPhoneLogic.kt:15:5Line detected, which is longer than the defined maximum line length in the code style.
12
13 class UtPhoneLogic : ShouldSpec({
14
15 infix fun Pair<String?, PhoneEncoding?>.shouldVerify(other: Pair<String?, String?>) = (first == other.first && second?.id == other.second) shouldBe true
16 infix fun Pair<String?, PhoneEncoding?>.shouldNotVerify(other: Pair<String?, String?>) = (first == other.first && second?.id == other.second) shouldBe false
17
18 fun mockEncoding(id: String) = PhoneEncoding(id = id, "", "", 0, false)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/test/java/com/sharecare/onboarding/UtPhoneLogic.kt:16:5Line detected, which is longer than the defined maximum line length in the code style.
13 class UtPhoneLogic : ShouldSpec({
14
15 infix fun Pair<String?, PhoneEncoding?>.shouldVerify(other: Pair<String?, String?>) = (first == other.first && second?.id == other.second) shouldBe true
16 infix fun Pair<String?, PhoneEncoding?>.shouldNotVerify(other: Pair<String?, String?>) = (first == other.first && second?.id == other.second) shouldBe false
17
18 fun mockEncoding(id: String) = PhoneEncoding(id = id, "", "", 0, false)
19
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/test/java/com/sharecare/onboarding/UtPhoneLogic.kt:67:9Line detected, which is longer than the defined maximum line length in the code style.
64
65
66 should("pass through unchanged states") {
67 PhoneEncodingUiLogic(previousNumber = "a", previousEncoding = mockEncoding("x"), inputNumber = "a", inputEncoding = mockEncoding("x")).compute().result shouldVerify ("a" to "x")
68 PhoneEncodingUiLogic(null, mockEncoding("x"), null, mockEncoding("x")).compute().result shouldVerify (null to "x")
69 PhoneEncodingUiLogic("a", null, "a", null).compute().result shouldVerify ("a" to null)
70 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/test/java/com/sharecare/onboarding/UtPhoneLogic.kt:68:9Line detected, which is longer than the defined maximum line length in the code style.
65
66 should("pass through unchanged states") {
67 PhoneEncodingUiLogic(previousNumber = "a", previousEncoding = mockEncoding("x"), inputNumber = "a", inputEncoding = mockEncoding("x")).compute().result shouldVerify ("a" to "x")
68 PhoneEncodingUiLogic(null, mockEncoding("x"), null, mockEncoding("x")).compute().result shouldVerify (null to "x")
69 PhoneEncodingUiLogic("a", null, "a", null).compute().result shouldVerify ("a" to null)
70 }
71
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/test/java/com/sharecare/onboarding/UtPhoneLogic.kt:78:9Line detected, which is longer than the defined maximum line length in the code style.
75 }
76
77 should("handle simultaneous state changes (with ambiguous helper)") {
78 PhoneEncodingUiLogic(null, null, "b", mockEncoding("y"), helper = ambiguousHelper).compute().result shouldVerify ("b" to "y")
79 PhoneEncodingUiLogic("a", mockEncoding("x"), "b", mockEncoding("y"), helper = ambiguousHelper).compute().result shouldVerify ("b" to "y")
80 PhoneEncodingUiLogic("a", mockEncoding("x"), null, mockEncoding("y"), helper = ambiguousHelper).compute().result shouldVerify (null to "y")
81 PhoneEncodingUiLogic("a", mockEncoding("x"), "b", null, helper = ambiguousHelper).compute().result shouldVerify ("b" to "x")
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/test/java/com/sharecare/onboarding/UtPhoneLogic.kt:79:9Line detected, which is longer than the defined maximum line length in the code style.
76
77 should("handle simultaneous state changes (with ambiguous helper)") {
78 PhoneEncodingUiLogic(null, null, "b", mockEncoding("y"), helper = ambiguousHelper).compute().result shouldVerify ("b" to "y")
79 PhoneEncodingUiLogic("a", mockEncoding("x"), "b", mockEncoding("y"), helper = ambiguousHelper).compute().result shouldVerify ("b" to "y")
80 PhoneEncodingUiLogic("a", mockEncoding("x"), null, mockEncoding("y"), helper = ambiguousHelper).compute().result shouldVerify (null to "y")
81 PhoneEncodingUiLogic("a", mockEncoding("x"), "b", null, helper = ambiguousHelper).compute().result shouldVerify ("b" to "x")
82 PhoneEncodingUiLogic("a", mockEncoding("x"), null, null, helper = ambiguousHelper).compute().result shouldVerify (null to "x")
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/test/java/com/sharecare/onboarding/UtPhoneLogic.kt:80:9Line detected, which is longer than the defined maximum line length in the code style.
77 should("handle simultaneous state changes (with ambiguous helper)") {
78 PhoneEncodingUiLogic(null, null, "b", mockEncoding("y"), helper = ambiguousHelper).compute().result shouldVerify ("b" to "y")
79 PhoneEncodingUiLogic("a", mockEncoding("x"), "b", mockEncoding("y"), helper = ambiguousHelper).compute().result shouldVerify ("b" to "y")
80 PhoneEncodingUiLogic("a", mockEncoding("x"), null, mockEncoding("y"), helper = ambiguousHelper).compute().result shouldVerify (null to "y")
81 PhoneEncodingUiLogic("a", mockEncoding("x"), "b", null, helper = ambiguousHelper).compute().result shouldVerify ("b" to "x")
82 PhoneEncodingUiLogic("a", mockEncoding("x"), null, null, helper = ambiguousHelper).compute().result shouldVerify (null to "x")
83 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/test/java/com/sharecare/onboarding/UtPhoneLogic.kt:81:9Line detected, which is longer than the defined maximum line length in the code style.
78 PhoneEncodingUiLogic(null, null, "b", mockEncoding("y"), helper = ambiguousHelper).compute().result shouldVerify ("b" to "y")
79 PhoneEncodingUiLogic("a", mockEncoding("x"), "b", mockEncoding("y"), helper = ambiguousHelper).compute().result shouldVerify ("b" to "y")
80 PhoneEncodingUiLogic("a", mockEncoding("x"), null, mockEncoding("y"), helper = ambiguousHelper).compute().result shouldVerify (null to "y")
81 PhoneEncodingUiLogic("a", mockEncoding("x"), "b", null, helper = ambiguousHelper).compute().result shouldVerify ("b" to "x")
82 PhoneEncodingUiLogic("a", mockEncoding("x"), null, null, helper = ambiguousHelper).compute().result shouldVerify (null to "x")
83 }
84
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_onboarding/src/test/java/com/sharecare/onboarding/UtPhoneLogic.kt:82:9Line detected, which is longer than the defined maximum line length in the code style.
79 PhoneEncodingUiLogic("a", mockEncoding("x"), "b", mockEncoding("y"), helper = ambiguousHelper).compute().result shouldVerify ("b" to "y")
80 PhoneEncodingUiLogic("a", mockEncoding("x"), null, mockEncoding("y"), helper = ambiguousHelper).compute().result shouldVerify (null to "y")
81 PhoneEncodingUiLogic("a", mockEncoding("x"), "b", null, helper = ambiguousHelper).compute().result shouldVerify ("b" to "x")
82 PhoneEncodingUiLogic("a", mockEncoding("x"), null, null, helper = ambiguousHelper).compute().result shouldVerify (null to "x")
83 }
84
85
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/Origami.kt:48:13Line detected, which is longer than the defined maximum line length in the code style.
45 sharedPreferences = context.getSharedPreferences(SHARED_PREFS_NAME, Context.MODE_PRIVATE)
46 }
47 if (sharedPreferencesForSubmission == null) {
48 sharedPreferencesForSubmission = context.getSharedPreferences(SHARED_PREFS_FOR_SUBMISSION_NAME, Context.MODE_PRIVATE)
49 }
50 if (liveSharedPreferences == null) {
51 liveSharedPreferences = LiveSharedPreferences(sharedPreferences!!)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/analytics/TrackerAnalytics.kt:24:17Line detected, which is longer than the defined maximum line length in the code style.
21 fun reportAutoTrackEvent(settingType: SettingType, isAutoTracked: Boolean) {
22 when (settingType) {
23 SettingType.STEPS -> {
24 reportTrackerEvent(if (isAutoTracked) GeneralAnalytics.Action.STEP_OPT_IN else GeneralAnalytics.Action.STEP_OPT_OUT)
25 }
26 SettingType.SLEEP -> {
27 reportTrackerEvent(if (isAutoTracked) GeneralAnalytics.Action.SLEEP_OPT_IN else GeneralAnalytics.Action.SLEEP_OPT_OUT)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/analytics/TrackerAnalytics.kt:27:17Line detected, which is longer than the defined maximum line length in the code style.
24 reportTrackerEvent(if (isAutoTracked) GeneralAnalytics.Action.STEP_OPT_IN else GeneralAnalytics.Action.STEP_OPT_OUT)
25 }
26 SettingType.SLEEP -> {
27 reportTrackerEvent(if (isAutoTracked) GeneralAnalytics.Action.SLEEP_OPT_IN else GeneralAnalytics.Action.SLEEP_OPT_OUT)
28 }
29 }
30 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/arc/sharedpreferencies/LiveSharedPreferences.kt:26:5Line detected, which is longer than the defined maximum line length in the code style.
23
24 //For some reason we are getting here null key, https://appcenter.ms/orgs/Sharecare-Inc-Organization/apps/R-Candi-1/crashes/errors/2434368331u/overview
25 // Android 11 migration issue
26 private val listener = SharedPreferences.OnSharedPreferenceChangeListener { _, key -> key?.let { publisher.onNext(key) } }
27
28 private val updates = publisher.doOnSubscribe {
29 preferences.registerOnSharedPreferenceChangeListener(listener)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/data/OrigamiRealmInteraction.kt:116:1Line detected, which is longer than the defined maximum line length in the code style.
113
114 }
115
116 fun ChartDetailRecord.setChart(trackerType: String, trackerChartItemResponse: TrackerChartDetailsItemResponse, canBeShown: Boolean) {
117 pointsInternal = ParsingUtil.getGson().toJson(trackerChartItemResponse.points)
118 this.trackerType = trackerType
119 displayUnit = trackerChartItemResponse.displayUnit
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/data/dao/GreenDayDao.kt:84:5Line detected, which is longer than the defined maximum line length in the code style.
81 /**
82 * Gets tracker charts for the specified tracker params.
83 */
84 fun getAllDetailCharts(origamiTrackerType: OrigamiTrackerType?, startDateTime: DateTime, timeFrameType: TimeFrameType):
85 LiveData<List<TrackerChart>> =
86 database.findAllMappedWithChanges({ realm ->
87 realm.where(ChartDetailRecord::class.java)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/data/dao/GreenDayDao.kt:166:9Line detected, which is longer than the defined maximum line length in the code style.
163 }
164
165 fun sortGreenDayAsync(realm: Realm, greenDay: GreenDay): GreenDay {
166 val trackerConfiguration: TrackerConfiguration? = TrackerConfigurationDao.getTrackerConfigurationOrNull(realm, greenDay.dateKey)
167 val stepsContainsPendingChanges: Boolean = ManualStepsBucketDao.hasAnyUnsyncedBuckets(realm)
168 val pendingTrackersMs: List<TrackerMsRecord> = TrackerDao.getPendingMsTrackers(realm, greenDay.dateKey)
169 val pendingTrackers: List<TrackerRecord> = TrackerDao.getPendingTrackers(realm, greenDay.dateKey)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/data/dao/GreenDayDao.kt:171:9Line detected, which is longer than the defined maximum line length in the code style.
168 val pendingTrackersMs: List<TrackerMsRecord> = TrackerDao.getPendingMsTrackers(realm, greenDay.dateKey)
169 val pendingTrackers: List<TrackerRecord> = TrackerDao.getPendingTrackers(realm, greenDay.dateKey)
170
171 greenDay.greenDayTrackers?.sortWith(getTrackerListComparator(trackerConfiguration, stepsContainsPendingChanges, pendingTrackersMs, pendingTrackers))
172 return greenDay
173 }
174
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/data/dao/GreenDayDao.kt:184:42Line detected, which is longer than the defined maximum line length in the code style.
181 private fun getTrackerListComparator(trackerConfiguration: TrackerConfiguration?,
182 stepsContainsPendingChanges: Boolean,
183 pendingTrackersMs: List<TrackerMsRecord>,
184 pendingTrackers: List<TrackerRecord>) = kotlin.Comparator<GreenDayTracker> { greenDayTracker, tracker ->
185
186 val sourceContainsPendingChanges = if (greenDayTracker.type!!.shouldSubmitToTrackerMs()) {
187 if (OrigamiTrackerType.STEPS == greenDayTracker.type!!) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/data/dao/TrackerConfigurationDao.kt:73:17Line detected, which is longer than the defined maximum line length in the code style.
70 // only an older configuration can be duplicated for the newer one
71 // if the last existing config is newer than the requested date, then we cannot
72 // duplicate it
73 if (configuration?.date?.toTrackerDate() != null && configuration.date!!.toTrackerDate()!!.isBefore(date)) {
74 configuration.resetConfigurationWithDate(date.toTrackerDateString())
75 configuration.let {
76 saveConfiguration(realm, it)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/data/dao/TrackerConfigurationDao.kt:205:13Line detected, which is longer than the defined maximum line length in the code style.
202 val trackerConfigurationRecord = TrackerConfigurationRecord()
203 trackerConfigurationRecord.setConfiguration(trackerConfiguration)
204 if (DateUtil.getTodayDate() == trackerConfigurationRecord.date) {
205 PreferenceStore.setUserNonSmoker(trackerConfigurationRecord.nonSmoker) // for analytics in DefaultAnalyticsParams.kt
206 }
207 realm.insertOrUpdate(trackerConfigurationRecord)
208 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/data/dao/TrackerConfigurationDao.kt:231:9Line detected, which is longer than the defined maximum line length in the code style.
228 }
229
230 companion object {
231 fun getTrackerConfigurationOrNull(realm: Realm, dateKey: String?): TrackerConfiguration? = realm.where(TrackerConfigurationRecord::class.java)
232 .equalTo(TrackerConfigurationRecord.DATE_KEY, dateKey)
233 .findFirst()
234 ?.toConfiguration()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/data/dao/TrackerDao.kt:209:9Line detected, which is longer than the defined maximum line length in the code style.
206 }
207
208 companion object{
209 fun getPendingTrackers(realm: Realm, dateKey: String?): List<TrackerRecord> = realm.where(TrackerRecord::class.java)
210 .equalTo(TrackerRecord.DATE_KEY, dateKey)
211 .findAll()
212
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/data/dao/TrackerDao.kt:213:9Line detected, which is longer than the defined maximum line length in the code style.
210 .equalTo(TrackerRecord.DATE_KEY, dateKey)
211 .findAll()
212
213 fun getPendingMsTrackers(realm: Realm, dateKey: String?): List<TrackerMsRecord> = realm.where(TrackerMsRecord::class.java)
214 .equalTo(TrackerMsRecord.DATE_KEY, dateKey)
215 .findAll()
216 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/data/dao/TrackerHistoryDao.kt:46:5Line detected, which is longer than the defined maximum line length in the code style.
43 }).map { it.filterNotNull() }
44 }
45
46 fun getDayTrackerItems(origamiTrackerType: OrigamiTrackerType?, updatableDays: Int, date: String): LiveData<List<TrackerItem>> {
47 return database.findAllMappedWithChanges({ realm ->
48 realm.where(TrackerItemHistoryRecord::class.java)
49 .equalTo(TrackerItemHistoryRecord.TYPE_KEY, origamiTrackerType?.name ?: "")
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/data/dao/TrackerHistoryDao.kt:117:25Line detected, which is longer than the defined maximum line length in the code style.
114 // The main purpose is to make minimum changes in the database via update.
115 // We iterate through the affected dateKeys and look for all trackers
116 dateKeys.forEach { dateKey ->
117 deleteTrackersSync(realm, dateKey, trackerType, records?.filter { it.id != null }?.map { it.id!! })
118 deleteTrackerDailiesSync(realm, dateKey, trackerType, dailyRecords?.filter { it.id != null }?.map { it.id!! })
119
120 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/data/dao/TrackerHistoryDao.kt:118:25Line detected, which is longer than the defined maximum line length in the code style.
115 // We iterate through the affected dateKeys and look for all trackers
116 dateKeys.forEach { dateKey ->
117 deleteTrackersSync(realm, dateKey, trackerType, records?.filter { it.id != null }?.map { it.id!! })
118 deleteTrackerDailiesSync(realm, dateKey, trackerType, dailyRecords?.filter { it.id != null }?.map { it.id!! })
119
120 }
121 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/data/dao/TrackerHistoryDao.kt:131:5Line detected, which is longer than the defined maximum line length in the code style.
128 }
129 }
130
131 private fun deleteTrackersSync(realm: Realm, dateKey: String, trackerType: String, idsToInsertOrUpdate: List<String>?) {
132 // We look for all tracker items of the given date and tracker type
133 val trackerResult = realm.where(TrackerItemHistoryRecord::class.java)
134 .equalTo(TrackerItemHistoryRecord.DATE_KEY, dateKey)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/data/dao/TrackerHistoryDao.kt:159:5Line detected, which is longer than the defined maximum line length in the code style.
156 }
157 }
158
159 private fun deleteTrackerDailiesSync(realm: Realm, dateKey: String, trackerType: String, idsToInsertOrUpdate: List<Int>?) {
160 // We look for all tracker dailies of the given date and tracker type
161 val dailyResult = realm.where(TrackerDailyHistoryRecord::class.java)
162 .equalTo(TrackerItemHistoryRecord.DATE_KEY, dateKey)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/data/dao/TrackerHistoryDao.kt:201:17Line detected, which is longer than the defined maximum line length in the code style.
198 trackerHistoryResponse?.trackers?.filterNotNull()
199 )
200 OrigamiTrackerType.DIET -> if (!trackerHistoryResponse?.foodReference.isNullOrEmpty()) {
201 trackerHistoryResponse?.dailyTrackers?.filterNotNull()?.filter { it.measure != null }?.forEach { dailyTracker ->
202 dailyTracker.measure!!.foodLabel =
203 trackerHistoryResponse.foodReference!!.firstOrNull { it.foodId == dailyTracker.measure!!.foodId }?.label?.capitalize(Locale.ROOT)
204 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/data/dao/TrackerHistoryDao.kt:203:25Line detected, which is longer than the defined maximum line length in the code style.
200 OrigamiTrackerType.DIET -> if (!trackerHistoryResponse?.foodReference.isNullOrEmpty()) {
201 trackerHistoryResponse?.dailyTrackers?.filterNotNull()?.filter { it.measure != null }?.forEach { dailyTracker ->
202 dailyTracker.measure!!.foodLabel =
203 trackerHistoryResponse.foodReference!!.firstOrNull { it.foodId == dailyTracker.measure!!.foodId }?.label?.capitalize(Locale.ROOT)
204 }
205 trackerHistoryResponse?.trackers?.filterNotNull()?.filter { it.measure != null }?.forEach { trackerItem ->
206 trackerItem.measure!!.foodLabel =
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/data/dao/TrackerHistoryDao.kt:205:17Line detected, which is longer than the defined maximum line length in the code style.
202 dailyTracker.measure!!.foodLabel =
203 trackerHistoryResponse.foodReference!!.firstOrNull { it.foodId == dailyTracker.measure!!.foodId }?.label?.capitalize(Locale.ROOT)
204 }
205 trackerHistoryResponse?.trackers?.filterNotNull()?.filter { it.measure != null }?.forEach { trackerItem ->
206 trackerItem.measure!!.foodLabel =
207 trackerHistoryResponse.foodReference!!.firstOrNull { it.foodId == trackerItem.measure!!.foodId }?.label?.capitalize(Locale.ROOT)
208 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/data/dao/TrackerHistoryDao.kt:207:25Line detected, which is longer than the defined maximum line length in the code style.
204 }
205 trackerHistoryResponse?.trackers?.filterNotNull()?.filter { it.measure != null }?.forEach { trackerItem ->
206 trackerItem.measure!!.foodLabel =
207 trackerHistoryResponse.foodReference!!.firstOrNull { it.foodId == trackerItem.measure!!.foodId }?.label?.capitalize(Locale.ROOT)
208 }
209 saveTrackers(
210 OrigamiTrackerType.DIET.name,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/data/dao/TrackerMeasurementDao.kt:86:5Line detected, which is longer than the defined maximum line length in the code style.
83 /**
84 * Returns all TrackerMeasurements that match the given MeasurementTypes
85 */
86 private fun getMeasurementsForTypes(types: List<TrackerMeasurement.MeasurementType>): LiveData<List<TrackerMeasurement>> =
87 database.findAllMappedWithChanges({ realm ->
88 realm.where(TrackerMeasurementRecord::class.java)
89 .`in`(TrackerMeasurementRecord.MEASUREMENT_TYPE_FIELD, types.map { it.name }.toTypedArray())
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/data/dao/TrackerMeasurementDao.kt:98:13Line detected, which is longer than the defined maximum line length in the code style.
95 * Returns first or null TrackerMeasurement that matches the given OrigamiTrackerType
96 */
97 fun getMeasurementsByTrackerType(origamiTrackerType: OrigamiTrackerType?): LiveData<List<TrackerMeasurement>> =
98 getMeasurementsForTypes(origamiTrackerType?.getMeasurementTypes() ?: listOf(TrackerMeasurement.MeasurementType.UNDEFINED))
99
100 /**
101 * Returns all TrackerMeasurements from the database
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/data/dao/TrackerMeasurementDao.kt:131:33Line detected, which is longer than the defined maximum line length in the code style.
128 return OrigamiTrackerType.values().map { trackerType ->
129 Pair(trackerType.name,
130 trackerType == OrigamiTrackerType.SLEEP ||
131 (measurements.filter { it.measurementType in trackerType.getMeasurementTypes() }.size == trackerType.getMeasurementTypes().size
132 && trackerType !in listOf(OrigamiTrackerType.SMOKE, OrigamiTrackerType.RELATIONSHIP))
133 )
134 }.toMap()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/data/dao/TrackerMeasurementDao.kt:132:41Line detected, which is longer than the defined maximum line length in the code style.
129 Pair(trackerType.name,
130 trackerType == OrigamiTrackerType.SLEEP ||
131 (measurements.filter { it.measurementType in trackerType.getMeasurementTypes() }.size == trackerType.getMeasurementTypes().size
132 && trackerType !in listOf(OrigamiTrackerType.SMOKE, OrigamiTrackerType.RELATIONSHIP))
133 )
134 }.toMap()
135 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/data/dao/sleep/MotionSensorDao.kt:11:2Line detected, which is longer than the defined maximum line length in the code style.
8 import org.joda.time.DateTime
9
10 /**
11 * MotionSensorDao is a DAO to work with Motion Sensor Entries - it stores phone's motions to approximately calculate user's sleep
12 * This dao is used for production (for debug check MotionSensorDebugDao)
13 */
14 class MotionSensorDao : BaseDao() {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/data/dao/sleep/MotionSensorDebugDao.kt:15:2Line detected, which is longer than the defined maximum line length in the code style.
12 import org.joda.time.DateTime
13
14 /**
15 * MotionSensorDebugDao is a DAO to work with Motion Sensor Entries - it stores phone's motions to approximately calculate user's sleep
16 * This dao is used for debug – debug motion sensor data is calculated much more frequently than the production one.
17 */
18 class MotionSensorDebugDao : BaseDao() {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/data/dao/steps/AndroidSdkStepsBucketDao.kt:9:2Line detected, which is longer than the defined maximum line length in the code style.
6 import org.joda.time.DateTime
7
8 /**
9 * AndroidSdkStepsBucketDao is a DAO to work with AndroidSdkStepsBucketRecords - the records that store steps calculated by android sdk
10 */
11 class AndroidSdkStepsBucketDao: BaseDao() {
12
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/data/dao/steps/AndroidSdkStepsBucketDao.kt:38:5Line detected, which is longer than the defined maximum line length in the code style.
35 /**
36 * Saves the bucket to the database
37 */
38 fun createOrUpdateBucket(stepBucketRecord: AndroidSdkStepsBucketRecord) = createOrUpdateBuckets(listOf(stepBucketRecord))
39
40 /**
41 * Saves the buckets to the database
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/data/dao/steps/GoogleFitStepsBucketDao.kt:9:2Line detected, which is longer than the defined maximum line length in the code style.
6 import org.joda.time.DateTime
7
8 /**
9 * GoogleFitStepsBucketDao is a DAO to work with GoogleFitStepsBucketRecords - the records that store steps calculated by GoogleFit
10 */
11 class GoogleFitStepsBucketDao : BaseDao() {
12
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/data/dao/steps/GoogleFitStepsBucketDao.kt:38:5Line detected, which is longer than the defined maximum line length in the code style.
35 /**
36 * Saves the bucket to the database
37 */
38 fun createOrUpdateBucket(stepBucketRecord: GoogleFitStepsBucketRecord) = createOrUpdateBuckets(listOf(stepBucketRecord))
39
40 /**
41 * Saves the buckets to the database
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/data/dao/steps/ManualStepsBucketDao.kt:10:2Line detected, which is longer than the defined maximum line length in the code style.
7 import org.joda.time.DateTime
8
9 /**
10 * ManualStepsBucketDao is a DAO to work with ManualStepsBucketRecords - the records that store steps provided by the user
11 */
12 class ManualStepsBucketDao : BaseDao() {
13 /**
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/data/dao/steps/ManualStepsBucketDao.kt:39:5Line detected, which is longer than the defined maximum line length in the code style.
36 /**
37 * Saves the bucket to the database
38 */
39 fun createOrUpdateBucket(stepBucketRecord: ManualStepsBucketRecord) = createOrUpdateBuckets(listOf(stepBucketRecord))
40
41 /**
42 * Saves the buckets to the database
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/deeplink/TrackerLinkParsers.kt:34:21Line detected, which is longer than the defined maximum line length in the code style.
31
32 val trackerDestination = TrackerDestinationData(it,
33 TRACKER_ENTER == pathSegments.getOrNull(MODE_PARAM_INDEX),
34 it in TrackerSubDestination.trackersPossibleToConfig && TRACKER_CONFIG == pathSegments.getOrNull(MODE_PARAM_INDEX))
35
36 val bundle = createTrackerBundle(trackerDestination)
37
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/GreenDayExtension.kt:11:21Line detected, which is longer than the defined maximum line length in the code style.
8 // the list of the trackers that should be represented as cards
9 greenDayTrackers?.filter {
10 it.type != null &&
11 ((it.type != OrigamiTrackerType.MEDICATION_GROUP && it.value == 0 && it.hasNoTrackers()) // is should not have previously submitted trackers
12 || (it.type == OrigamiTrackerType.MEDICATION_GROUP && it.value == 3)) && // the number 3 is returned by the server and in the case of Medication tracker means that it was not yet submitted
13 !it.isAutomatic(DateTime.now()) // it should not be automatically tracked
14 }?.sortedBy { it.type!!.name } // we sort it alphabetically by the tracker type
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/GreenDayExtension.kt:12:29Line detected, which is longer than the defined maximum line length in the code style.
9 greenDayTrackers?.filter {
10 it.type != null &&
11 ((it.type != OrigamiTrackerType.MEDICATION_GROUP && it.value == 0 && it.hasNoTrackers()) // is should not have previously submitted trackers
12 || (it.type == OrigamiTrackerType.MEDICATION_GROUP && it.value == 3)) && // the number 3 is returned by the server and in the case of Medication tracker means that it was not yet submitted
13 !it.isAutomatic(DateTime.now()) // it should not be automatically tracked
14 }?.sortedBy { it.type!!.name } // we sort it alphabetically by the tracker type
15 ?: listOf()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/GreenDayTrackerExtension.kt:12:2Line detected, which is longer than the defined maximum line length in the code style.
9 import org.joda.time.DateTime
10
11 /**
12 * The purpose of these extensions is to make the code more readable and to understand the actual logic that lays underneath
13 * Developers should use these extensions and not write their own checks.
14 * The reason we have this class is that GreenDayTracker belongs to java-sdk repo and some classes that we use here do not belong there.
15 */
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/GreenDayTrackerExtension.kt:14:2Line detected, which is longer than the defined maximum line length in the code style.
11 /**
12 * The purpose of these extensions is to make the code more readable and to understand the actual logic that lays underneath
13 * Developers should use these extensions and not write their own checks.
14 * The reason we have this class is that GreenDayTracker belongs to java-sdk repo and some classes that we use here do not belong there.
15 */
16
17 fun GreenDayTracker.isAutomatic(date: DateTime): Boolean {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/LabelKey.kt:8:2Line detected, which is longer than the defined maximum line length in the code style.
5
6 /**
7 * These values are returned by the server and used to define the label for the trackers on the dashboard.
8 * Consider NOT to add values here that are not returned by the server. Instead you may create a standalone enum class (check MealType or MealSize)
9 */
10 enum class LabelKey(val stringResource: Int) {
11 CALM(R.string.detailed_tracker_type_name_stress_1),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/OrigamiTrackerTypeExtension.kt:8:2Line detected, which is longer than the defined maximum line length in the code style.
5
6 /**
7 * An list of extensions to the OrigamiTrackerType that are related to the origami module.
8 * If you plan to use an extension only in the origami module – consider adding it here rather than adding it to the OrigamiTrackerType.kt
9 *
10 * Avoid using values() method if you need the list of the types per user.
11 * Different markets have different trackers available. Consider using valuesForUser() instead.
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/TrackerChart.kt:17:6Line detected, which is longer than the defined maximum line length in the code style.
14 var toDate: DateTime? = null
15
16 /**
17 * Instead of calculating this every time, we calculate this once (prior saving to the database) and save alongside with the chart
18 */
19 var canBeShown: Boolean = false
20
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/TrackerChart.kt:46:5Line detected, which is longer than the defined maximum line length in the code style.
43 var startTime: String? = null
44 var endTime: String? = null
45 var value: Double? = null
46 var values: Map<String, Double>? = null // this is used in the case of blood pressure because it has multiple values per point
47 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/TrackerDataExtension.kt:26:13Line detected, which is longer than the defined maximum line length in the code style.
23 OrigamiTrackerType.SLEEP -> return TrackerPreferenceStore.getRepo().isSleepAutoTracked()
24 }
25 return false
26 } else return !(this.source != null && (Source.SourceType.SHARECARE.name.equals(this.source?.sourceType, true) ||
27 Source.SourceType.USER.name.equals(this.source?.sourceType, true)))
28 } else {
29 return false
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/TrackerDataExtension.kt:44:13Line detected, which is longer than the defined maximum line length in the code style.
41 enumMap.put(TrackerMeasurement.SubmissionMeasurementType.ALCOHOL_DRINKS, value)
42 }
43 OrigamiTrackerType.BLOOD_PRESSURE -> {
44 enumMap.put(TrackerMeasurement.SubmissionMeasurementType.BLOOD_PRESSURE_SYSTOLIC, (this as BloodPressureTrackerData).systolic)
45 enumMap.put(TrackerMeasurement.SubmissionMeasurementType.BLOOD_PRESSURE_DIASTOLIC, diastolic)
46 }
47 OrigamiTrackerType.BLOOD_GLUCOSE -> {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/TrackerDataExtension.kt:68:13Line detected, which is longer than the defined maximum line length in the code style.
65 enumMap.put(TrackerMeasurement.SubmissionMeasurementType.RELATIONSHIP_LEVEL, value)
66 }
67 OrigamiTrackerType.SLEEP -> {
68 enumMap.put(TrackerMeasurement.SubmissionMeasurementType.SLEEP_BED_TIME, (this as SleepTrackerData).from?.toDateTime()?.millis)
69 enumMap.put(TrackerMeasurement.SubmissionMeasurementType.SLEEP_RISE_TIME, this.to?.toDateTime()?.millis)
70 enumMap.put(TrackerMeasurement.SubmissionMeasurementType.SLEEP_QUALITY, score)
71 // if the source is USER, then we don't need to show "I wasn't sleeping flag"
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/TrackerDataExtension.kt:72:13Line detected, which is longer than the defined maximum line length in the code style.
69 enumMap.put(TrackerMeasurement.SubmissionMeasurementType.SLEEP_RISE_TIME, this.to?.toDateTime()?.millis)
70 enumMap.put(TrackerMeasurement.SubmissionMeasurementType.SLEEP_QUALITY, score)
71 // if the source is USER, then we don't need to show "I wasn't sleeping flag"
72 enumMap.put(TrackerMeasurement.SubmissionMeasurementType.SLEEP_NO_SLEEP_FLAG_TO_SHOW, source?.sourceType != Source.SourceType.USER.name)
73 }
74 OrigamiTrackerType.SMOKE -> {
75 enumMap.put(TrackerMeasurement.SubmissionMeasurementType.SMOKE_CIGARETTES, value)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerDaily.kt:95:5Line detected, which is longer than the defined maximum line length in the code style.
92 valueDiastolic: Double, unitDiastolic: String
93 ) : TrackerDaily(id, dateKey, greenDayValue, version, riskStratificationDisplay) {
94
95 override val measure = BloodPressureMeasure.create(moment, valueSystolic, unitSystolic, valueDiastolic, unitDiastolic)
96
97 override val type: OrigamiTrackerType = OrigamiTrackerType.BLOOD_PRESSURE
98 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerDaily.kt:161:5Line detected, which is longer than the defined maximum line length in the code style.
158 dateKey: DateTime,
159 greenDayValue: Int, version: GreenDayTracker.Version,
160 riskStratificationDisplay: RiskStratificationDisplay?,
161 moment: DateTime, rxCode: String, dosage: Double, medicationName: String?, medicationGroupId: String?, medicationDosage: Double
162 ) : TrackerDaily(id, dateKey, greenDayValue, version, riskStratificationDisplay) {
163 override val measure = MedicationMeasure.create(moment, rxCode, dosage, medicationName, medicationGroupId, medicationDosage, greenDayValue)
164
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerDaily.kt:163:5Line detected, which is longer than the defined maximum line length in the code style.
160 riskStratificationDisplay: RiskStratificationDisplay?,
161 moment: DateTime, rxCode: String, dosage: Double, medicationName: String?, medicationGroupId: String?, medicationDosage: Double
162 ) : TrackerDaily(id, dateKey, greenDayValue, version, riskStratificationDisplay) {
163 override val measure = MedicationMeasure.create(moment, rxCode, dosage, medicationName, medicationGroupId, medicationDosage, greenDayValue)
164
165 override val type: OrigamiTrackerType = OrigamiTrackerType.MEDICATION_GROUP
166 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerDaily.kt:201:5Line detected, which is longer than the defined maximum line length in the code style.
198 selectedDate: String?
199 ) : TrackerDaily(id, dateKey, greenDayValue, version, riskStratificationDisplay) {
200
201 override val measure = SleepMeasure.create(startInMilliseconds, endInMilliseconds, measureUnit, quality, false, selectedDate)
202
203 override val type: OrigamiTrackerType = OrigamiTrackerType.SLEEP
204 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerDailyFactory.kt:64:29Line detected, which is longer than the defined maximum line length in the code style.
61 ) {
62 trackerDaily = BloodPressureTrackerDaily(
63 id, dateKey, greenDayValue, version,
64 riskStratificationDisplay, moment, systolicValue, systolicUnit, diastolicValue, diastolicUnit
65 )
66 }
67 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerDailyFactory.kt:99:25Line detected, which is longer than the defined maximum line length in the code style.
96
97 trackerDaily = MedicationTrackerDaily(
98 id, dateKey, greenDayValue, version,
99 riskStratificationDisplay, dateKey, "0", dosage, medicationName, medicationGroupId, medicationDosage
100 )
101
102 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerDailyFactory.kt:114:21Line detected, which is longer than the defined maximum line length in the code style.
111 }
112 OrigamiTrackerType.SLEEP -> {
113 val unit = MeasureUnit.getByUnit(dailyTrackerResponse.measure?.sleepDuration?.unit)
114 val startDateTime = dailyTrackerResponse.measure?.effectiveTimeFrame?.timeInterval?.startDateTime?.toTrackerDateTime()
115 val endDateTime = dailyTrackerResponse.measure?.effectiveTimeFrame?.timeInterval?.endDateTime?.toTrackerDateTime()
116 val selectedDate = dailyTrackerResponse.measure?.effectiveTimeFrame?.dateTime
117 if (unit != null && startDateTime != null && endDateTime != null) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerDailyFactory.kt:115:21Line detected, which is longer than the defined maximum line length in the code style.
112 OrigamiTrackerType.SLEEP -> {
113 val unit = MeasureUnit.getByUnit(dailyTrackerResponse.measure?.sleepDuration?.unit)
114 val startDateTime = dailyTrackerResponse.measure?.effectiveTimeFrame?.timeInterval?.startDateTime?.toTrackerDateTime()
115 val endDateTime = dailyTrackerResponse.measure?.effectiveTimeFrame?.timeInterval?.endDateTime?.toTrackerDateTime()
116 val selectedDate = dailyTrackerResponse.measure?.effectiveTimeFrame?.dateTime
117 if (unit != null && startDateTime != null && endDateTime != null) {
118 trackerDaily = SleepTrackerDaily(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerDailyFactory.kt:143:21Line detected, which is longer than the defined maximum line length in the code style.
140 }
141 OrigamiTrackerType.STEPS -> {
142 val steps = dailyTrackerResponse.measure?.stepCount?.toInt()
143 val start = dailyTrackerResponse.measure?.effectiveTimeFrame?.timeInterval?.startDateTime?.toTrackerDateTime()
144 val end = dailyTrackerResponse.measure?.effectiveTimeFrame?.timeInterval?.endDateTime?.toTrackerDateTime()
145 if (steps != null) {
146 if (moment != null) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerDailyFactory.kt:144:21Line detected, which is longer than the defined maximum line length in the code style.
141 OrigamiTrackerType.STEPS -> {
142 val steps = dailyTrackerResponse.measure?.stepCount?.toInt()
143 val start = dailyTrackerResponse.measure?.effectiveTimeFrame?.timeInterval?.startDateTime?.toTrackerDateTime()
144 val end = dailyTrackerResponse.measure?.effectiveTimeFrame?.timeInterval?.endDateTime?.toTrackerDateTime()
145 if (steps != null) {
146 if (moment != null) {
147 trackerDaily = StepsTrackerDaily(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerHistoryBaseItem.kt:44:5Line detected, which is longer than the defined maximum line length in the code style.
41 abstract val measure: Measure
42
43
44 open fun isNotLegacy(): Boolean = this.version != GreenDayTracker.Version.V1 && this.type.shouldSubmitToTrackerMs() == true
45
46 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerItem.kt:109:1Line detected, which is longer than the defined maximum line length in the code style.
106 * Note: for an ID we do not use an actual ID of the tracker item, but we just hash the tracker type and
107 * a dateKey and also a string "dummy" to distinguish actual tracker ids from the dummy ones.
108 */
109 class DummyTrackerItem(override val type: OrigamiTrackerType, dateKey: DateTime, isInEditableRange: Boolean, isLegacyItem: Boolean) : TrackerItem(
110 Objects.hash("dummy", type, dateKey).toString(),
111 UUID.randomUUID().toString(),
112 dateKey,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerItem.kt:147:1Line detected, which is longer than the defined maximum line length in the code style.
144 isLegacyItem: Boolean,
145 version: GreenDayTracker.Version,
146 display: TrackerHistoryDisplay?
147 ) : TrackerItem(id, extId, dateKey, createdDate, updatedDate, channelType, isInEditableRange, isLegacyItem, version, display) {
148
149 override val measure = AlcoholMeasure.create(moment, alcoholUse)
150
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerItem.kt:179:1Line detected, which is longer than the defined maximum line length in the code style.
176 isLegacyItem: Boolean,
177 version: GreenDayTracker.Version,
178 display: TrackerHistoryDisplay?
179 ) : TrackerItem(id, extId, dateKey, createdDate, updatedDate, channelType, isInEditableRange, isLegacyItem, version, display) {
180
181 override val measure = BloodGlucoseMeasure.create(moment, bloodGlucose, unit)
182
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerItem.kt:212:1Line detected, which is longer than the defined maximum line length in the code style.
209 isLegacyItem: Boolean,
210 version: GreenDayTracker.Version,
211 display: TrackerHistoryDisplay?
212 ) : TrackerItem(id, extId, dateKey, createdDate, updatedDate, channelType, isInEditableRange, isLegacyItem, version, display) {
213
214 override val measure = BloodPressureMeasure.create(moment, valueSystolic, unitSystolic, valueDiastolic, unitDiastolic)
215
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerItem.kt:214:5Line detected, which is longer than the defined maximum line length in the code style.
211 display: TrackerHistoryDisplay?
212 ) : TrackerItem(id, extId, dateKey, createdDate, updatedDate, channelType, isInEditableRange, isLegacyItem, version, display) {
213
214 override val measure = BloodPressureMeasure.create(moment, valueSystolic, unitSystolic, valueDiastolic, unitDiastolic)
215
216 override val type: OrigamiTrackerType = OrigamiTrackerType.BLOOD_PRESSURE
217
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerItem.kt:245:1Line detected, which is longer than the defined maximum line length in the code style.
242 isLegacyItem: Boolean,
243 version: GreenDayTracker.Version,
244 display: TrackerHistoryDisplay?
245 ) : TrackerItem(id, extId, dateKey, createdDate, updatedDate, channelType, isInEditableRange, isLegacyItem, version, display) {
246
247 override val measure = CholesterolMeasure.create(moment, value, unit)
248
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerItem.kt:278:1Line detected, which is longer than the defined maximum line length in the code style.
275 isLegacyItem: Boolean,
276 version: GreenDayTracker.Version,
277 display: TrackerHistoryDisplay?
278 ) : TrackerItem(id, extId, dateKey, createdDate, updatedDate, channelType, isInEditableRange, isLegacyItem, version, display) {
279
280 override val measure = DietMeasureLegacy.create(moment, mealType.name, mealQuality, mealQuantity)
281
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerItem.kt:313:1Line detected, which is longer than the defined maximum line length in the code style.
310 isLegacyItem: Boolean,
311 version: GreenDayTracker.Version,
312 display: TrackerHistoryDisplay?
313 ) : TrackerItem(id, extId, dateKey, createdDate, updatedDate, channelType, isInEditableRange, isLegacyItem, version, display) {
314
315 override val measure = DietMeasure.create(moment, dietLevel)
316
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerItem.kt:344:1Line detected, which is longer than the defined maximum line length in the code style.
341 isLegacyItem: Boolean,
342 version: GreenDayTracker.Version,
343 display: TrackerHistoryDisplay?
344 ) : TrackerItem(id, extId, dateKey, createdDate, updatedDate, channelType, isInEditableRange, isLegacyItem, version, display) {
345
346 override val measure = DietMeasure.create(moment, foodId, foodLabel)
347
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerItem.kt:376:1Line detected, which is longer than the defined maximum line length in the code style.
373 isLegacyItem: Boolean,
374 version: GreenDayTracker.Version,
375 display: TrackerHistoryDisplay?
376 ) : TrackerItem(id, extId, dateKey, createdDate, updatedDate, channelType, isInEditableRange, isLegacyItem, version, display) {
377
378 override val measure = FitnessMeasure.create(moment, fitnessLevel)
379
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerItem.kt:410:1Line detected, which is longer than the defined maximum line length in the code style.
407 val dosage: Double,
408 private val rxCode: String, medicationName: String?, medicationGroupId: String?, medicationDosage: Double,
409 display: TrackerHistoryDisplay?
410 ) : TrackerItem(id, extId, dateKey, createdDate, updatedDate, channelType, isInEditableRange, isLegacyItem, version, display) {
411
412 override val measure = MedicationMeasure.create(moment, rxCode, dosage, medicationName, medicationGroupId, medicationDosage, 0)
413
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerItem.kt:412:5Line detected, which is longer than the defined maximum line length in the code style.
409 display: TrackerHistoryDisplay?
410 ) : TrackerItem(id, extId, dateKey, createdDate, updatedDate, channelType, isInEditableRange, isLegacyItem, version, display) {
411
412 override val measure = MedicationMeasure.create(moment, rxCode, dosage, medicationName, medicationGroupId, medicationDosage, 0)
413
414 override val type: OrigamiTrackerType = OrigamiTrackerType.MEDICATION_GROUP
415
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerItem.kt:443:1Line detected, which is longer than the defined maximum line length in the code style.
440 isLegacyItem: Boolean,
441 version: GreenDayTracker.Version,
442 display: TrackerHistoryDisplay?
443 ) : TrackerItem(id, extId, dateKey, createdDate, updatedDate, channelType, isInEditableRange, isLegacyItem, version, display) {
444
445 override val measure = RelationshipMeasure.create(moment, relationship)
446
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerItem.kt:477:1Line detected, which is longer than the defined maximum line length in the code style.
474 isLegacyItem: Boolean,
475 version: GreenDayTracker.Version,
476 display: TrackerHistoryDisplay?
477 ) : TrackerItem(id, extId, dateKey, createdDate, updatedDate, channelType, isInEditableRange, isLegacyItem, version, display) {
478
479 override val measure = SleepMeasure.create(startInMilliseconds, endInMilliseconds, measureUnit, quality, false, selectedDate)
480
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerItem.kt:479:5Line detected, which is longer than the defined maximum line length in the code style.
476 display: TrackerHistoryDisplay?
477 ) : TrackerItem(id, extId, dateKey, createdDate, updatedDate, channelType, isInEditableRange, isLegacyItem, version, display) {
478
479 override val measure = SleepMeasure.create(startInMilliseconds, endInMilliseconds, measureUnit, quality, false, selectedDate)
480
481 override val type: OrigamiTrackerType = OrigamiTrackerType.SLEEP
482
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerItem.kt:490:9Line detected, which is longer than the defined maximum line length in the code style.
487 enumMap.put(TrackerMeasurement.SubmissionMeasurementType.SLEEP_RISE_TIME, endInMilliseconds)
488 enumMap.put(TrackerMeasurement.SubmissionMeasurementType.SLEEP_QUALITY, quality)
489 // if the source is USER, then we don't need to show "I wasn't sleeping flag"
490 enumMap.put(TrackerMeasurement.SubmissionMeasurementType.SLEEP_NO_SLEEP_FLAG_TO_SHOW, source != Source.SourceType.USER.name)
491 return enumMap
492 }
493
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerItem.kt:513:1Line detected, which is longer than the defined maximum line length in the code style.
510 isLegacyItem: Boolean,
511 version: GreenDayTracker.Version,
512 display: TrackerHistoryDisplay?
513 ) : TrackerItem(id, extId, dateKey, createdDate, updatedDate, channelType, isInEditableRange, isLegacyItem, version, display) {
514
515 override val measure = SmokeMeasure.create(moment, smokeLevel)
516
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerItem.kt:541:1Line detected, which is longer than the defined maximum line length in the code style.
538 isLegacyItem: Boolean,
539 version: GreenDayTracker.Version,
540 display: TrackerHistoryDisplay?
541 ) : TrackerItem(id, extId, dateKey, createdDate, updatedDate, channelType, isInEditableRange, isLegacyItem, version, display) {
542 override lateinit var measure: StepsMeasure
543 private var stepsCount: Int = 0
544 private lateinit var _source: String
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerItem.kt:563:5Line detected, which is longer than the defined maximum line length in the code style.
560 isLegacyItem: Boolean,
561 version: GreenDayTracker.Version,
562 display: TrackerHistoryDisplay?
563 ) : this(id, extId, dateKey, createdDate, updatedDate, channelType, isInEditableRange, isLegacyItem, version, display) {
564 this.measure = StepsMeasure.create(start, end, steps)
565 this._source = source
566 this.stepsCount = steps
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerItem.kt:583:5Line detected, which is longer than the defined maximum line length in the code style.
580 isLegacyItem: Boolean,
581 version: GreenDayTracker.Version,
582 display: TrackerHistoryDisplay?
583 ) : this(id, extId, dateKey, createdDate, updatedDate, channelType, isInEditableRange, isLegacyItem, version, display) {
584 this.measure = StepsMeasure.create(moment, steps)
585 this._source = source
586 this.stepsCount = steps
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerItem.kt:616:1Line detected, which is longer than the defined maximum line length in the code style.
613 isLegacyItem: Boolean,
614 version: GreenDayTracker.Version,
615 display: TrackerHistoryDisplay?
616 ) : TrackerItem(id, extId, dateKey, createdDate, updatedDate, channelType, isInEditableRange, isLegacyItem, version, display) {
617
618 override val measure = StressMeasure.create(moment, stressLevel, null, StressSourceType.USER)
619
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerItem.kt:652:1Line detected, which is longer than the defined maximum line length in the code style.
649 version: GreenDayTracker.Version,
650 display: TrackerHistoryDisplay?,
651 val voiceStressId: Int?
652 ) : TrackerItem(id, extId, dateKey, createdDate, updatedDate, channelType, isInEditableRange, isLegacyItem, version, display) {
653
654 override val measure = if (start != null && end != null) {
655 StressMeasure.create(start, end, stressLevel, voiceStressId, StressSourceType.getByName(source) ?: StressSourceType.USER)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerItem.kt:655:9Line detected, which is longer than the defined maximum line length in the code style.
652 ) : TrackerItem(id, extId, dateKey, createdDate, updatedDate, channelType, isInEditableRange, isLegacyItem, version, display) {
653
654 override val measure = if (start != null && end != null) {
655 StressMeasure.create(start, end, stressLevel, voiceStressId, StressSourceType.getByName(source) ?: StressSourceType.USER)
656 } else {
657 StressMeasure.create(moment!!, stressLevel, voiceStressId, StressSourceType.getByName(source) ?: StressSourceType.USER)
658 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerItem.kt:657:9Line detected, which is longer than the defined maximum line length in the code style.
654 override val measure = if (start != null && end != null) {
655 StressMeasure.create(start, end, stressLevel, voiceStressId, StressSourceType.getByName(source) ?: StressSourceType.USER)
656 } else {
657 StressMeasure.create(moment!!, stressLevel, voiceStressId, StressSourceType.getByName(source) ?: StressSourceType.USER)
658 }
659
660 override val type: OrigamiTrackerType = OrigamiTrackerType.STRESS
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerItem.kt:690:1Line detected, which is longer than the defined maximum line length in the code style.
687 isLegacyItem: Boolean,
688 version: GreenDayTracker.Version,
689 display: TrackerHistoryDisplay?
690 ) : TrackerItem(id, extId, dateKey, createdDate, updatedDate, channelType, isInEditableRange, isLegacyItem, version, display) {
691
692 override val measure = StressMeasureLegacy.create(moment, stressLevel)
693
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerItem.kt:723:1Line detected, which is longer than the defined maximum line length in the code style.
720 isLegacyItem: Boolean,
721 version: GreenDayTracker.Version,
722 display: TrackerHistoryDisplay?
723 ) : TrackerItem(id, extId, dateKey, createdDate, updatedDate, channelType, isInEditableRange, isLegacyItem, version, display) {
724
725 override val measure = WeightMeasure.create(moment, bodyWeight, unit)
726
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerItemFactory.kt:28:13Line detected, which is longer than the defined maximum line length in the code style.
25 val isLegacyItem = trackerResponse.isFromGdt()
26 val id = trackerResponse.id
27 val extId = if (isLegacyItem || trackerResponse.extId == null) {
28 UUID.randomUUID().toString() // if the tracker belongs to the GreenDay domain or no ext is is returned – we generate one
29 } else {
30 trackerResponse.extId!!
31 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerItemFactory.kt:41:9Line detected, which is longer than the defined maximum line length in the code style.
38 val moment = trackerResponse.measure?.effectiveTimeFrame?.dateTime?.toTrackerDateTime()
39 val version = GreenDayTracker.Version.getByVersionName(trackerResponse.version)
40 val display = trackerResponse.ext?.display
41 return if (id != null && type != null && dateKey != null && createdDate != null && updatedDate != null && channelType != null) {
42 var trackerItem: TrackerItem? = null
43 // The editable range is between now and "updatableDays" in the past.
44 val isInEditableRange = dateKey.isInEditableRange(updatableDays)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerItemFactory.kt:70:21Line detected, which is longer than the defined maximum line length in the code style.
67 val systolicUnit = trackerResponse.measure?.systolicBloodPressure?.unit
68 val diastolicValue = trackerResponse.measure?.diastolicBloodPressure?.value
69 val diastolicUnit = trackerResponse.measure?.diastolicBloodPressure?.unit
70 if (moment != null && systolicValue != null && systolicUnit != null && diastolicValue != null && diastolicUnit != null) {
71 trackerItem = BloodPressureTrackerItem(
72 id, extId, dateKey, createdDate, updatedDate,
73 channelType, source, moment, systolicValue, systolicUnit, diastolicValue, diastolicUnit,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerItemFactory.kt:117:37Line detected, which is longer than the defined maximum line length in the code style.
114 else -> if (mealType != null && mealQuality != null && mealQuantity != null) {
115 DietLegacyTrackerItem(
116 id, extId, dateKey, createdDate, updatedDate, channelType, source, moment,
117 mealType, mealQuality, mealQuantity, isInEditableRange, isLegacyItem, version, display
118 )
119 } else {
120 null
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerItemFactory.kt:143:29Line detected, which is longer than the defined maximum line length in the code style.
140 if (moment != null && rxCode != null && dosage != null) {
141 trackerItem = MedicationTrackerItem(
142 id, extId, dateKey, createdDate, updatedDate, channelType, source, moment,
143 isInEditableRange, isLegacyItem, version, dosage, rxCode, medicationName, medicationGroupId, medicationDosage, display
144 )
145 }
146 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerItemFactory.kt:158:21Line detected, which is longer than the defined maximum line length in the code style.
155 }
156 OrigamiTrackerType.SLEEP -> {
157 val unit = MeasureUnit.getByUnit(trackerResponse.measure?.sleepDuration?.unit)
158 val startDateTime = trackerResponse.measure?.effectiveTimeFrame?.timeInterval?.startDateTime?.toTrackerDateTime()
159 val endDateTime = trackerResponse.measure?.effectiveTimeFrame?.timeInterval?.endDateTime?.toTrackerDateTime()
160 val selectedDate = trackerResponse.measure?.effectiveTimeFrame?.dateTime
161 if (unit != null && startDateTime != null && endDateTime != null) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerItemFactory.kt:159:21Line detected, which is longer than the defined maximum line length in the code style.
156 OrigamiTrackerType.SLEEP -> {
157 val unit = MeasureUnit.getByUnit(trackerResponse.measure?.sleepDuration?.unit)
158 val startDateTime = trackerResponse.measure?.effectiveTimeFrame?.timeInterval?.startDateTime?.toTrackerDateTime()
159 val endDateTime = trackerResponse.measure?.effectiveTimeFrame?.timeInterval?.endDateTime?.toTrackerDateTime()
160 val selectedDate = trackerResponse.measure?.effectiveTimeFrame?.dateTime
161 if (unit != null && startDateTime != null && endDateTime != null) {
162 trackerItem = SleepTrackerItem(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerItemFactory.kt:180:21Line detected, which is longer than the defined maximum line length in the code style.
177 }
178 OrigamiTrackerType.STEPS -> {
179 val steps = trackerResponse.measure?.stepCount?.toInt()
180 val start = trackerResponse.measure?.effectiveTimeFrame?.timeInterval?.startDateTime?.toTrackerDateTime()
181 val end = trackerResponse.measure?.effectiveTimeFrame?.timeInterval?.endDateTime?.toTrackerDateTime()
182 if (steps != null) {
183 if (moment != null) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerItemFactory.kt:181:21Line detected, which is longer than the defined maximum line length in the code style.
178 OrigamiTrackerType.STEPS -> {
179 val steps = trackerResponse.measure?.stepCount?.toInt()
180 val start = trackerResponse.measure?.effectiveTimeFrame?.timeInterval?.startDateTime?.toTrackerDateTime()
181 val end = trackerResponse.measure?.effectiveTimeFrame?.timeInterval?.endDateTime?.toTrackerDateTime()
182 if (steps != null) {
183 if (moment != null) {
184 trackerItem = StepsTrackerItem(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerItemFactory.kt:200:21Line detected, which is longer than the defined maximum line length in the code style.
197 val descriptiveType = DescriptiveType.getByName(trackerResponse.measure?.descriptiveType)
198 val stressLevel = trackerResponse.measure?.stressLevel?.toInt()
199 val voiceStressId = trackerResponse.measure?.voiceStressId
200 val start = trackerResponse.measure?.effectiveTimeFrame?.timeInterval?.startDateTime?.toTrackerDateTime()
201 val end = trackerResponse.measure?.effectiveTimeFrame?.timeInterval?.endDateTime?.toTrackerDateTime()
202
203 trackerItem = when {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/history/TrackerItemFactory.kt:201:21Line detected, which is longer than the defined maximum line length in the code style.
198 val stressLevel = trackerResponse.measure?.stressLevel?.toInt()
199 val voiceStressId = trackerResponse.measure?.voiceStressId
200 val start = trackerResponse.measure?.effectiveTimeFrame?.timeInterval?.startDateTime?.toTrackerDateTime()
201 val end = trackerResponse.measure?.effectiveTimeFrame?.timeInterval?.endDateTime?.toTrackerDateTime()
202
203 trackerItem = when {
204 source == StressSourceType.FT_VOICE_ANALYZER.name &&
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/model/steps/GoogleFitStepsBucket.kt:23:9Line detected, which is longer than the defined maximum line length in the code style.
20 companion object {
21 // creates a bucket from the Google Fit value
22 // we don't care about the bucket length here (as we've requested a valid bucket length in GoogleFitTool)
23 fun fromGoogleFit(value: Int, startDate: Long, endDate: Long, dateTimeZone: DateTimeZone): GoogleFitStepsBucket {
24 val stepsBucket = GoogleFitStepsBucket(dateTimeZone)
25 stepsBucket.startDate = startDate
26 stepsBucket.endDate = endDate
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/calendar/CalendarFragment.kt:91:13Line detected, which is longer than the defined maximum line length in the code style.
88
89 val presenter = TrackerCalendarAdapterPresenter()
90 getAdapter().setPresenter(presenter)
91 getAdapter().init(selectedDate.minusMonths(1)) // ScrollCalendar uses months from 0 to 11, so we have to do minusMonths(1)
92
93 setDateStateDefiner(object : DateStateDefiner {
94 override fun getStateForDate(millis: Long): Int {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/calendar/CalendarFragment.kt:103:21Line detected, which is longer than the defined maximum line length in the code style.
100 setOnDateClickListener(object : OnDateClickListener {
101 override fun onDateClicked(millis: Long) {
102 // sets the selected date upon click if it's not yet selected or disabled then cloees the screen
103 if (getStateForDate(selectedDate, startFromDate, DateTime.now().withMillis(millis)) != CalendarDay.DISABLED) {
104 val givenDate = DateTime.now().withMillis(millis)
105 .withTimeAtStartOfDay()
106 vm.setSelectedDate(givenDate)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/calendar/CalendarViewModel.kt:79:5Line detected, which is longer than the defined maximum line length in the code style.
76
77 private val visibleYear: MutableLiveData<Int> = MutableLiveData()
78
79 private val programStartDate: LivePreference<String> = liveSharedPreferencesRepository.getGreenDayProgramStartDayAsLiveData()
80
81 private val monthsToLoad: MutableLiveData<Pair<Calendar?, Calendar?>> = MutableLiveData()
82
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/calendar/CalendarViewModelFactory.kt:22:25Line detected, which is longer than the defined maximum line length in the code style.
19 override fun <T : ViewModel> create(modelClass: Class<T>): T {
20 return CalendarViewModelImpl(
21 GreenDayCompactRepositoryImpl(
22 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
23 Origami.getDatabaseInstance().greenDayCompactModel()
24 ),
25 LiveSharedPreferencesRepositoryImpl(Origami.liveSharedPreferences!!),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/conditional/fragment/BinaryConditionalFragment.kt:128:17Line detected, which is longer than the defined maximum line length in the code style.
125 )
126
127 private fun start(
128 navigationController: NavigationController, origamiTrackerTypeConditional: OrigamiTrackerTypeConditional,
129 positiveNavigationDestination: NavigationDestination,
130 negativeNavigationDestination: NavigationDestination,
131 shouldReInitValue: Boolean = false,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/conditional/fragment/ConditionalFragment.kt:20:2Line detected, which is longer than the defined maximum line length in the code style.
17
18 /**
19 * ConditionalFragment is an abstract class to represent core functionality for both binary and numeric
20 * conditional fragments that are used when a user needs to specify if they are a smoker or a drinker or specify their height
21 */
22 abstract class ConditionalFragment : ViewBindingFragment<FragmentConditionalBinding>() {
23 override fun initViewBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentConditionalBinding =
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/conditional/fragment/NumericConditionalFragment.kt:42:5Line detected, which is longer than the defined maximum line length in the code style.
39 numericBinding?.numericConditionalView?.initObservers(viewLifecycleOwner)
40 }
41
42 override fun provideTitleTextResource(): Int = numericBinding?.numericConditionalView?.provideTitleTextResource() ?: 0
43 ?: 0
44
45
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/conditional/fragment/NumericConditionalFragment.kt:56:9Line detected, which is longer than the defined maximum line length in the code style.
53
54 companion object {
55 // to make it easier (and more readable) - we create custom methods for each tracker type
56 fun startForWeightFromSettings(navigationController: NavigationController) = start(navigationController, OrigamiTrackerTypeConditional.WEIGHT,
57 NavigationDestination.BACK)
58
59 fun startForWeightFromDashboard(navigationController: NavigationController) = start(navigationController, OrigamiTrackerTypeConditional.WEIGHT,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/conditional/fragment/NumericConditionalFragment.kt:59:9Line detected, which is longer than the defined maximum line length in the code style.
56 fun startForWeightFromSettings(navigationController: NavigationController) = start(navigationController, OrigamiTrackerTypeConditional.WEIGHT,
57 NavigationDestination.BACK)
58
59 fun startForWeightFromDashboard(navigationController: NavigationController) = start(navigationController, OrigamiTrackerTypeConditional.WEIGHT,
60 NavigationDestination.SUBMISSION_FRAGMENT)
61
62 fun startForWeightFromDetails(navigationController: NavigationController, dateTime: DateTime) = start(navigationController, OrigamiTrackerTypeConditional.WEIGHT,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/conditional/fragment/NumericConditionalFragment.kt:62:9Line detected, which is longer than the defined maximum line length in the code style.
59 fun startForWeightFromDashboard(navigationController: NavigationController) = start(navigationController, OrigamiTrackerTypeConditional.WEIGHT,
60 NavigationDestination.SUBMISSION_FRAGMENT)
61
62 fun startForWeightFromDetails(navigationController: NavigationController, dateTime: DateTime) = start(navigationController, OrigamiTrackerTypeConditional.WEIGHT,
63 NavigationDestination.SUBMISSION_FRAGMENT, dateTime)
64
65 fun startForWeightFromUpdate(navigationController: NavigationController) = start(navigationController, OrigamiTrackerTypeConditional.WEIGHT,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/conditional/fragment/NumericConditionalFragment.kt:65:9Line detected, which is longer than the defined maximum line length in the code style.
62 fun startForWeightFromDetails(navigationController: NavigationController, dateTime: DateTime) = start(navigationController, OrigamiTrackerTypeConditional.WEIGHT,
63 NavigationDestination.SUBMISSION_FRAGMENT, dateTime)
64
65 fun startForWeightFromUpdate(navigationController: NavigationController) = start(navigationController, OrigamiTrackerTypeConditional.WEIGHT,
66 NavigationDestination.SUBMISSION_FRAGMENT)
67
68 private fun start(navigationController: NavigationController, origamiTrackerTypeConditional: OrigamiTrackerTypeConditional,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/conditional/fragment/NumericConditionalFragment.kt:68:9Line detected, which is longer than the defined maximum line length in the code style.
65 fun startForWeightFromUpdate(navigationController: NavigationController) = start(navigationController, OrigamiTrackerTypeConditional.WEIGHT,
66 NavigationDestination.SUBMISSION_FRAGMENT)
67
68 private fun start(navigationController: NavigationController, origamiTrackerTypeConditional: OrigamiTrackerTypeConditional,
69 positiveNavigationDestination: NavigationDestination,
70 dateTime: DateTime? = null) {
71 val targetFragment: Fragment = NumericConditionalFragment().apply {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/conditional/view/binary/BinaryConditionalViewModel.kt:163:5Line detected, which is longer than the defined maximum line length in the code style.
160
161 private var selectedDateString: String? = null
162
163 private fun provideSelectedDateString(): String = selectedDateString ?: sharedPreferencesRepository.getSelectedDate()
164
165 override fun provideSelectedDate(): DateTime = provideSelectedDateString().toTrackerDate() ?: DateTime.now()
166
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/conditional/view/binary/BinaryConditionalViewModel.kt:167:5Line detected, which is longer than the defined maximum line length in the code style.
164
165 override fun provideSelectedDate(): DateTime = provideSelectedDateString().toTrackerDate() ?: DateTime.now()
166
167 override fun provideSelectedType(): OrigamiTrackerType = OrigamiTrackerType.getByName(origamiTrackerTypeConditional?.name)!!
168
169 /**
170 * It's a copy of an existing configuration, which we'll change once a user would change their
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/conditional/view/binary/BinaryConditionalViewModel.kt:183:5Line detected, which is longer than the defined maximum line length in the code style.
180
181 override fun provideQuestionTextResource(): Int = origamiTrackerTypeConditional?.provideQuestionTextResource() ?: 0
182
183 override fun provideDescriptionTextResource(): Int = origamiTrackerTypeConditional?.provideDescriptionTextResource() ?: 0
184
185 override fun provideTitleTextResource(): Int = origamiTrackerTypeConditional?.provideTitleTextResource() ?: 0
186
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/conditional/view/binary/BinaryConditionalViewModel.kt:204:9Line detected, which is longer than the defined maximum line length in the code style.
201 }
202 }
203 }
204 sharedPreferencesRepository.removeDashboardLastUpdatedMoment() // so that once we return to the dashboard it would trigger an update
205 navigateIfNeeded()
206 }
207
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/conditional/view/binary/BinaryConditionalViewModelFactory.kt:21:25Line detected, which is longer than the defined maximum line length in the code style.
18 override fun <T : ViewModel> create(modelClass: Class<T>): T {
19 return BinaryConditionalViewModelImpl(
20 ConfigurationRepositoryImpl(
21 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
22 Origami.getDatabaseInstance().trackerConfigurationModel(),
23 OrigamiSharedPreferencesRepositoryImpl(Origami.sharedPreferences!!)
24 ),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/conditional/view/numeric/NumericConditionalView.kt:38:5Line detected, which is longer than the defined maximum line length in the code style.
35 DateTime.now().toTrackerDateString())
36 }
37
38 fun initViewForStandaloneScreen(origamiTrackerTypeConditional: OrigamiTrackerTypeConditional, positiveNavigationDestination: NavigationDestination,
39 selectedDateString: String?) {
40 viewModel.init(origamiTrackerTypeConditional, positiveNavigationDestination, selectedDateString)
41 initNumericView()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/conditional/view/numeric/NumericConditionalView.kt:72:21Line detected, which is longer than the defined maximum line length in the code style.
69 )
70 initDropDown(viewModel.provideListOfOptions().indexOf(it), dropdownBinding, it.items,
71 resources.getString(it.stringResource).capitalize())
72 // we also add each dropdown to a collection to be able to access them if we'll need to pass previously selected values there
73 listOfTextViews.add(dropdownBinding.filledExposedDropdown)
74 dropdownBinding.filledExposedDropdown.setDropDownBackgroundResource(R.color.surface)
75 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/conditional/view/numeric/NumericConditionalView.kt:104:25Line detected, which is longer than the defined maximum line length in the code style.
101 // if the config is unset, we set default values (first element in the list)
102 for (i in listOfTextViews.indices) {
103 with(listOfTextViews[i]) {
104 if (this.adapter != null && this.adapter.count > 0 && this.adapter.getItem(0) as? String != null) {
105 val defaultValue = this.adapter.getItem(0) as String
106 this.setText(defaultValue, false)
107 viewModel.setSelection(i, defaultValue.toInt())
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/conditional/view/numeric/NumericConditionalViewModel.kt:111:39Line detected, which is longer than the defined maximum line length in the code style.
108 }
109
110 class NumericConditionalViewModelImpl(private val configurationRepository: ConfigurationRepository,
111 private val sharedPreferencesRepository: OrigamiSharedPreferencesRepository) : ViewModel(), NumericConditionalViewModel {
112
113 private val unitLocale = LocaleUtil.getUnitLocale()
114
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/conditional/view/numeric/NumericConditionalViewModel.kt:116:5Line detected, which is longer than the defined maximum line length in the code style.
113 private val unitLocale = LocaleUtil.getUnitLocale()
114
115 // This array is used to store the NEW selected by user values.
116 // A new selected value is assigned to an element with an index that matches the index of the dropdown list in the UI
117 private var selectedValuesArray: Array<Int?> = arrayOfNulls(2)
118
119 // This a representation of the EXISTING selected values.
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/conditional/view/numeric/NumericConditionalViewModel.kt:132:33Line detected, which is longer than the defined maximum line length in the code style.
129 }
130 UnitLocale.US,
131 UnitLocale.UK -> {
132 val (feet, inches) = height.toValue(Length.Format.FEET_AND_INCHES) as Length.FeetAndInches
133 selectedValuesArray = arrayOf(feet, inches)
134 }
135 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/conditional/view/numeric/NumericConditionalViewModel.kt:153:33Line detected, which is longer than the defined maximum line length in the code style.
150 it.heightInMeter = when (unitLocale) {
151 UnitLocale.METRIC -> {
152 if (selectedValuesArray.firstOrNull() != null) {
153 Length(selectedValuesArray.first()!!.toDouble(), Length.Format.CM).toValue(Length.Format.METER) as Double
154 } else {
155 null
156 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/conditional/view/numeric/NumericConditionalViewModel.kt:206:5Line detected, which is longer than the defined maximum line length in the code style.
203
204 private var selectedDateString: String? = null
205
206 private fun provideSelectedDateString(): String = selectedDateString ?: sharedPreferencesRepository.getSelectedDate()
207
208 override fun provideSelectedDate(): DateTime = provideSelectedDateString().toTrackerDate() ?: DateTime.now()
209
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/conditional/view/numeric/NumericConditionalViewModel.kt:210:5Line detected, which is longer than the defined maximum line length in the code style.
207
208 override fun provideSelectedDate(): DateTime = provideSelectedDateString().toTrackerDate() ?: DateTime.now()
209
210 override fun provideSelectedType(): OrigamiTrackerType = OrigamiTrackerType.getByName(origamiTrackerTypeConditional?.name)!!
211
212 /**
213 * It's a copy of an existing configuration, which we'll change once a user would change their
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/conditional/view/numeric/NumericConditionalViewModel.kt:226:5Line detected, which is longer than the defined maximum line length in the code style.
223
224 override fun provideQuestionTextResource(): Int = origamiTrackerTypeConditional?.provideQuestionTextResource() ?: 0
225
226 override fun provideDescriptionTextResource(): Int = origamiTrackerTypeConditional?.provideDescriptionTextResource() ?: 0
227
228 override fun provideTitleTextResource(): Int = origamiTrackerTypeConditional?.provideTitleTextResource() ?: 0
229
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/conditional/view/numeric/NumericConditionalViewModel.kt:246:13Line detected, which is longer than the defined maximum line length in the code style.
243 shouldStartWorker.requestNavigation()
244 }
245 }
246 sharedPreferencesRepository.removeDashboardLastUpdatedMoment() // so that once we return to the dashboard it would trigger an update
247 navigateIfNeeded()
248 }
249 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/conditional/view/numeric/NumericConditionalViewModelFactory.kt:21:25Line detected, which is longer than the defined maximum line length in the code style.
18 override fun <T : ViewModel> create(modelClass: Class<T>): T {
19 return NumericConditionalViewModelImpl(
20 ConfigurationRepositoryImpl(
21 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
22 Origami.getDatabaseInstance().trackerConfigurationModel(),
23 OrigamiSharedPreferencesRepositoryImpl(Origami.sharedPreferences!!)
24 ),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/conditionalupdate/ConditionalUpdateFragment.kt:17:2Line detected, which is longer than the defined maximum line length in the code style.
14 import com.sharecare.realgreen.origami.presentation.details.DetailsFragment
15
16 /**
17 * This fragment notifies a user that they do not track some tracker and provides them two options: Update settings or View History
18 * https://zpl.io/a884eoQ
19 */
20 class ConditionalUpdateFragment : ViewBindingFragment<FragmentConditionalUpdateBinding>() {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/conditionalupdate/ConditionalUpdateFragment.kt:22:5Line detected, which is longer than the defined maximum line length in the code style.
19 */
20 class ConditionalUpdateFragment : ViewBindingFragment<FragmentConditionalUpdateBinding>() {
21
22 private val viewModel: ConditionalUpdateViewModel by viewModels<ConditionalUpdateViewModelImpl> { ConditionalUpdateViewModelFactory() }
23
24 override fun initViewBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentConditionalUpdateBinding =
25 FragmentConditionalUpdateBinding.inflate(inflater, container, false)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/conditionalupdate/ConditionalUpdateFragment.kt:98:9Line detected, which is longer than the defined maximum line length in the code style.
95
96 private const val EXTRA_SELECTED_TRACKER_TYPE = "extra_selected_tracker_type"
97
98 fun startForAlcohol(navigationController: NavigationController) = start(navigationController, OrigamiTrackerType.ALCOHOL)
99
100 fun startForBloodGlucose(navigationController: NavigationController) = start(navigationController, OrigamiTrackerType.BLOOD_GLUCOSE)
101
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/conditionalupdate/ConditionalUpdateFragment.kt:100:9Line detected, which is longer than the defined maximum line length in the code style.
97
98 fun startForAlcohol(navigationController: NavigationController) = start(navigationController, OrigamiTrackerType.ALCOHOL)
99
100 fun startForBloodGlucose(navigationController: NavigationController) = start(navigationController, OrigamiTrackerType.BLOOD_GLUCOSE)
101
102 fun startForSmoke(navigationController: NavigationController) = start(navigationController, OrigamiTrackerType.SMOKE)
103
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/conditionalupdate/ConditionalUpdateFragment.kt:102:9Line detected, which is longer than the defined maximum line length in the code style.
99
100 fun startForBloodGlucose(navigationController: NavigationController) = start(navigationController, OrigamiTrackerType.BLOOD_GLUCOSE)
101
102 fun startForSmoke(navigationController: NavigationController) = start(navigationController, OrigamiTrackerType.SMOKE)
103
104 private fun start(navigationController: NavigationController, origamiTrackerType: OrigamiTrackerType) {
105 val args = Bundle()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/conditionalupdate/ConditionalUpdateViewModel.kt:47:1Line detected, which is longer than the defined maximum line length in the code style.
44 fun openConditionalScreen()
45 }
46
47 class ConditionalUpdateViewModelImpl(private val sharedPreferencesRepository: OrigamiSharedPreferencesRepository) : ViewModel(), ConditionalUpdateViewModel {
48
49 private var origamiTrackerType: OrigamiTrackerType? = null
50
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/DashboardFragment.kt:71:5Line detected, which is longer than the defined maximum line length in the code style.
68 */
69 class DashboardFragment : ViewBindingFragment<FragmentDashboardBinding>(), RootFragment {
70
71 private val dataHandlerViewModel: DataHandlerViewModel by viewModels<DataHandlerViewModelImpl> { DataHandlerViewModelFactory() }
72
73 private val listViewModel: DashboardListViewModel by viewModels<DashboardListViewModelImpl> { DashboardListViewModelFactory() }
74
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/DashboardFragment.kt:73:5Line detected, which is longer than the defined maximum line length in the code style.
70
71 private val dataHandlerViewModel: DataHandlerViewModel by viewModels<DataHandlerViewModelImpl> { DataHandlerViewModelFactory() }
72
73 private val listViewModel: DashboardListViewModel by viewModels<DashboardListViewModelImpl> { DashboardListViewModelFactory() }
74
75 private val devViewModel: DevViewModel by viewModels<DevViewModelImpl> { DevViewModelFactory() }
76
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/DashboardFragment.kt:96:9Line detected, which is longer than the defined maximum line length in the code style.
93
94 override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
95 super.onViewCreated(view, savedInstanceState)
96 listViewModel.initForVega(requireContext().assets, VegaSpecBuilder.makeColorsMap(requireContext()), provideCorrectDimensToVegaSpec())
97 initView()
98 initObservers()
99 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/DashboardFragment.kt:138:13Line detected, which is longer than the defined maximum line length in the code style.
135 dataHandlerViewModel.shouldNavigateToGdtStack.requestNavigation()
136 }
137 },
138 ConfigurationManager().getConfiguration().getFeatureConfiguration(FeatureConfigurationType.GDT) as GDTConfiguration
139 )
140 binding.trackersContainerLayout.setItemViewCacheSize(DashboardEpoxyController.CACHED_ITEM_SIZE)
141 binding.trackersContainerLayout.setController(dashboardAdapter!!)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/DashboardFragment.kt:151:21Line detected, which is longer than the defined maximum line length in the code style.
148 } catch (e: IllegalStateException) {
149 L.e(
150 DashboardFragment::class.java.name,
151 "The tooltips were asked to be shown when the fragment was not yet rendered or the user closed it quickly",
152 e
153 )
154 try {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/DashboardFragment.kt:185:9Line detected, which is longer than the defined maximum line length in the code style.
182
183 // we observe the selected date and do nothing because internally the view model does all the job
184 // it updates the green day and the configuration if the selected date is out of the last 7 days range
185 // we assume that we always have the last 7 days green days, so we don't have to update the config unless the socket event has arrived
186 // or we're back online or we are out of battery saver mode agaain
187 dataHandlerViewModel.selectedDate.observe(viewLifecycleOwner) {}
188
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/DashboardFragment.kt:235:9Line detected, which is longer than the defined maximum line length in the code style.
232 }
233 }
234 }
235 listViewModel.shouldNavigateToSubmissionScreenInEditMode.observe(viewLifecycleOwner) { param: Pair<TrackerData?, Boolean>? ->
236 if (param != null && param.first != null) {
237 showTrackerSubmissionInEditModeFragment(param.first!!, param.second)
238 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/DashboardFragment.kt:268:13Line detected, which is longer than the defined maximum line length in the code style.
265 MedicationConditionalFragment.start(this)
266 }
267 if (NetworkUtil.isNetworkAvailable(requireContext())) {
268 SocketConnection.registerForSocketConnection(lifecycle, EventType.GDT_UPDATED, object : ClientWebSocket.MessageListener {
269 override fun onSocketMessage(message: String?, params: JsonElement?) {
270 activity?.runOnUiThread {
271 dataHandlerViewModel.refreshDataBySocketEvent()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/DashboardFragment.kt:312:13Line detected, which is longer than the defined maximum line length in the code style.
309 )
310 } else {
311 binding.toolbar.toolbar.inflateMenu(R.menu.menu_dashboard_not_today)
312 binding.toolbar.toolbar.menu.findItem(R.id.menu_item_today).setTitleColor(resources.getColor(R.color.type_high))
313 }
314 binding.toolbar.toolbar.menu.findItem(R.id.menu_item_collapse)?.setIcon(
315 if (expandedState == DashboardEpoxyController.DashboardExpandedState.USER_COLLAPSED) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/DataHandlerViewModel.kt:128:9Line detected, which is longer than the defined maximum line length in the code style.
125 }
126
127 init {
128 // we set the selected date to the default value, so that when a user opens the dashboard, we shall show them today
129 sharedPreferencesRepository.setSelectedDate(DateTime.now().toTrackerDateString())
130 isStepsAutoTracked = sharedPreferencesRepository.isStepsAutoTracked()
131 refreshGreenWeek()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/DataHandlerViewModel.kt:134:5Line detected, which is longer than the defined maximum line length in the code style.
131 refreshGreenWeek()
132 }
133
134 private val isAnyGreenDayRefreshing = combineLatest(isGreenDayRefreshing, isGreenWeekRefreshing, isUpdatableGreenDaysRefreshing).map {
135 val isGreenDayRefreshing = it.first
136 val isGreenWeekRefreshing = it.second
137 val isUpdatableGreenDaysRefreshing = it.third
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/DataHandlerViewModel.kt:180:6Line detected, which is longer than the defined maximum line length in the code style.
177 }
178
179 /**
180 * Fetches a list of green day compacts starting from today and one week before (or more if the updatable range is bigger)
181 */
182 private fun refreshGreenWeek() {
183 isGreenWeekRefreshing.value = true
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/DataHandlerViewModel.kt:186:9Line detected, which is longer than the defined maximum line length in the code style.
183 isGreenWeekRefreshing.value = true
184 val toDate = DateTime.now()
185 val fromDate = toDate.minusDays(max(gdtConfiguration.getUpdatableDays(), 6))
186 greenDayCompactRepository.refreshGreenDayCompacts(fromDate.toTrackerDateString(), toDate.toTrackerDateString()) {
187 saveDashboardLastUpdatedMoment()
188 isGreenWeekRefreshing.value = false
189 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/DataHandlerViewModel.kt:241:6Line detected, which is longer than the defined maximum line length in the code style.
238 override fun refreshDataByUserIntention() = refreshData()
239
240 /**
241 * Keep this method private. There should be a reason to trigger such a massive update: a user intention or a socket event
242 */
243 private fun refreshData() {
244 refreshConfiguration()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/DataHandlerViewModel.kt:254:25Line detected, which is longer than the defined maximum line length in the code style.
251 val lastUpdatedTime = sharedPreferencesRepository.getDashboardLastUpdatedMoment().toTrackerDateTime()
252 return lastUpdatedTime == null ||
253 lastUpdatedTime.isBefore(DateTime.now()
254 .minusMinutes(OrigamiSharedPreferencesRepositoryImpl.DASHBOARD_NO_GREENDAY_UPDATES_THRESHOLD_IN_MINUTES))
255 }
256
257 private fun saveDashboardLastUpdatedMoment() {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/DataHandlerViewModelFactory.kt:44:13Line detected, which is longer than the defined maximum line length in the code style.
41 ),
42 OrigamiSharedPreferencesRepositoryImpl(Origami.sharedPreferences!!),
43 LiveSharedPreferencesRepositoryImpl(Origami.liveSharedPreferences!!),
44 ConfigurationManager().getConfiguration().getFeatureConfiguration(FeatureConfigurationType.GDT) as GDTConfiguration
45 ) as T
46 }
47 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/dev/DevViewModelFactory.kt:20:25Line detected, which is longer than the defined maximum line length in the code style.
17 override fun <T : ViewModel> create(modelClass: Class<T>): T {
18 return DevViewModelImpl(
19 UserSettingsRepositoryImpl(
20 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.USER_SETTINGS) as UserSettingsService,
21 OrigamiSharedPreferencesRepositoryImpl(Origami.sharedPreferences!!)
22 )
23 ) as T
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/header/DashboardHeaderView.kt:18:5Line detected, which is longer than the defined maximum line length in the code style.
15 */
16 class DashboardHeaderView(context: Context, attrs: AttributeSet?) : LinearLayout(context, attrs),
17 DashboardHeaderViewModelAccessor by DashboardHeaderViewModelInjector() {
18 private val binding: ViewDashboardHeaderBinding = ViewDashboardHeaderBinding.inflate(LayoutInflater.from(context), this, true)
19
20 fun attachOnClickListener(onClickListener: OnClickListener) {
21 binding.addEntriesButton.setOnClickListener {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/header/DashboardHeaderViewModel.kt:70:36Line detected, which is longer than the defined maximum line length in the code style.
67 }
68
69 class DashboardHeaderViewModelImpl(private val greenDayRepository: GreenDayRepository,
70 liveSharedPreferencesRepository: LiveSharedPreferencesRepository) : ViewModel(), DashboardHeaderViewModel {
71 private val _selectedDate: LivePreference<String> = liveSharedPreferencesRepository.getSelectedDateAsLiveData()
72
73 private val greenDay: LiveData<GreenDay?> = _selectedDate.switchMap {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/header/DashboardHeaderViewModel.kt:77:5Line detected, which is longer than the defined maximum line length in the code style.
74 greenDayRepository.getGreenDay(it ?: DateTime.now().toTrackerDateString())
75 }
76
77 private val _isActiveSleepTracking: MutableLiveData<Boolean> = MutableLiveData(SensorsCollectingService.isTrackingNow)
78
79 override val selectedDate: LiveData<String>
80 get() = _selectedDate.map {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/header/DashboardHeaderViewModelFactory.kt:25:25Line detected, which is longer than the defined maximum line length in the code style.
22 override fun <T : ViewModel> create(modelClass: Class<T>): T {
23 return DashboardHeaderViewModelImpl(
24 GreenDayRepositoryImpl(
25 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
26 Origami.getDatabaseInstance().greenDayModel()
27 ),
28 LiveSharedPreferencesRepositoryImpl(Origami.liveSharedPreferences!!)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/header/DashboardHeaderViewModelFactory.kt:41:5Line detected, which is longer than the defined maximum line length in the code style.
38 * Injects the ViewModel into the dashboard header
39 */
40 class DashboardHeaderViewModelInjector : DashboardHeaderViewModelAccessor {
41 override var headerViewModel: DashboardHeaderViewModel = DashboardHeaderViewModelFactory().create(DashboardHeaderViewModelImpl::class.java)
42 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/header/weekview/WeekView.kt:82:17Line detected, which is longer than the defined maximum line length in the code style.
79 */
80 private fun initStyle(context: Context, attrs: AttributeSet?) {
81 val typedArray = context
82 .obtainStyledAttributes(attrs, R.styleable.ScrollCalendar, R.attr.scrollCalendarStyleAttr, R.style.WeekViewStyle)
83 dayStyle = typedArray.getResourceId(R.styleable.ScrollCalendar_dayStyle, 0)
84 currentDayStyle = typedArray.getResourceId(R.styleable.ScrollCalendar_currentDayStyle, 0)
85 selectedDayStyle = typedArray.getResourceId(R.styleable.ScrollCalendar_selectedItemStyle, 0)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/header/weekview/WeekViewModel.kt:21:6Line detected, which is longer than the defined maximum line length in the code style.
18 */
19 interface WeekViewModel {
20 /**
21 * A live data with a triple: a selected date, a green day program started date and a list of items for the calendar.
22 * We need all three at a time to handle the state of the days in the calendar. The state relies on the selected date
23 * and the green day program started date for SELECTED, SELECTED_TODAY and DISABLED cases
24 */
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/header/weekview/WeekViewModel.kt:22:6Line detected, which is longer than the defined maximum line length in the code style.
19 interface WeekViewModel {
20 /**
21 * A live data with a triple: a selected date, a green day program started date and a list of items for the calendar.
22 * We need all three at a time to handle the state of the days in the calendar. The state relies on the selected date
23 * and the green day program started date for SELECTED, SELECTED_TODAY and DISABLED cases
24 */
25 val dayListWithDates: LiveData<Triple<String?, String?, List<DayEntry>?>>
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/header/weekview/WeekViewModel.kt:35:25Line detected, which is longer than the defined maximum line length in the code style.
32
33 class WeekViewModelImpl(greenDayCompactRepository: GreenDayCompactRepository,
34 liveSharedPreferencesRepository: LiveSharedPreferencesRepository,
35 private val sharedPreferencesRepository: OrigamiSharedPreferencesRepository) : ViewModel(), WeekViewModel {
36
37 private val selectedDate: LivePreference<String> = liveSharedPreferencesRepository.getSelectedDateAsLiveData()
38
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/header/weekview/WeekViewModel.kt:39:5Line detected, which is longer than the defined maximum line length in the code style.
36
37 private val selectedDate: LivePreference<String> = liveSharedPreferencesRepository.getSelectedDateAsLiveData()
38
39 private val programStartDate: LivePreference<String> = liveSharedPreferencesRepository.getGreenDayProgramStartDayAsLiveData()
40
41 private val weekList = greenDayCompactRepository.getGreenDayCompactsInDateRange(
42 DateTime.now().minusDays(6).withTimeAtStartOfDay().millis,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/header/weekview/WeekViewModelFactory.kt:22:25Line detected, which is longer than the defined maximum line length in the code style.
19 override fun <T : ViewModel> create(modelClass: Class<T>): T {
20 return WeekViewModelImpl(
21 GreenDayCompactRepositoryImpl(
22 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
23 Origami.getDatabaseInstance().greenDayCompactModel()
24 ),
25 LiveSharedPreferencesRepositoryImpl(Origami.liveSharedPreferences!!),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/header/weekview/internal/DashboardDayHolder.kt:23:1Line detected, which is longer than the defined maximum line length in the code style.
20 * calendarCallback is used to handle the clicks.
21 * resProvider is used to handle the styles.
22 */
23 class DashboardDayHolder(private val calendarCallback: DayClickCallback, private val resProvider: DashboardDayResProvider) : View.OnClickListener {
24 // the parent container
25 private var linearLayout: LinearLayout? = null
26 // the text view that represents the day of week
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardEpoxyController.kt:37:32Line detected, which is longer than the defined maximum line length in the code style.
34 */
35 class DashboardEpoxyController(private var viewLifecycleOwner: LifecycleOwner,
36 private val resources: Resources,
37 private var onOpenSubmissionClickListener: OnItemClickListener? = null, // an action to open submission page
38 private var onOpenDetailsClickListener: OnItemClickListener? = null, // an action for opening the details,
39 private var onStepsLearnMoreClickListener: View.OnClickListener? = null, // an action for "Learn more" button on the info tip
40 private var onStepsGotItClickListener: View.OnClickListener? = null, // an action for "Got it" button on the info tip
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardEpoxyController.kt:38:32Line detected, which is longer than the defined maximum line length in the code style.
35 class DashboardEpoxyController(private var viewLifecycleOwner: LifecycleOwner,
36 private val resources: Resources,
37 private var onOpenSubmissionClickListener: OnItemClickListener? = null, // an action to open submission page
38 private var onOpenDetailsClickListener: OnItemClickListener? = null, // an action for opening the details,
39 private var onStepsLearnMoreClickListener: View.OnClickListener? = null, // an action for "Learn more" button on the info tip
40 private var onStepsGotItClickListener: View.OnClickListener? = null, // an action for "Got it" button on the info tip
41 private val onHeaderClickListener: DashboardHeaderView.OnClickListener,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardEpoxyController.kt:39:32Line detected, which is longer than the defined maximum line length in the code style.
36 private val resources: Resources,
37 private var onOpenSubmissionClickListener: OnItemClickListener? = null, // an action to open submission page
38 private var onOpenDetailsClickListener: OnItemClickListener? = null, // an action for opening the details,
39 private var onStepsLearnMoreClickListener: View.OnClickListener? = null, // an action for "Learn more" button on the info tip
40 private var onStepsGotItClickListener: View.OnClickListener? = null, // an action for "Got it" button on the info tip
41 private val onHeaderClickListener: DashboardHeaderView.OnClickListener,
42 private val gdtConfiguration: GDTConfiguration
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardEpoxyController.kt:40:32Line detected, which is longer than the defined maximum line length in the code style.
37 private var onOpenSubmissionClickListener: OnItemClickListener? = null, // an action to open submission page
38 private var onOpenDetailsClickListener: OnItemClickListener? = null, // an action for opening the details,
39 private var onStepsLearnMoreClickListener: View.OnClickListener? = null, // an action for "Learn more" button on the info tip
40 private var onStepsGotItClickListener: View.OnClickListener? = null, // an action for "Got it" button on the info tip
41 private val onHeaderClickListener: DashboardHeaderView.OnClickListener,
42 private val gdtConfiguration: GDTConfiguration
43 ) : EpoxyController() {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardEpoxyController.kt:71:13Line detected, which is longer than the defined maximum line length in the code style.
68 .addIf(isLoading, this)
69
70 entries.forEach { trackerItemViewModel ->
71 DashboardTrackerCollapsedEpoxyModel(trackerItemViewModel, viewLifecycleOwner, onOpenSubmissionClickListener, onOpenDetailsClickListener, expandedState, resources, gdtConfiguration)
72 .id(Objects.hash(trackerItemViewModel.type, DashboardTrackerCollapsedEpoxyModel::class.java.name))
73 .addTo(this)
74
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardEpoxyController.kt:75:13Line detected, which is longer than the defined maximum line length in the code style.
72 .id(Objects.hash(trackerItemViewModel.type, DashboardTrackerCollapsedEpoxyModel::class.java.name))
73 .addTo(this)
74
75 DashboardTrackerExpandedEpoxyModel(trackerItemViewModel, viewLifecycleOwner, onOpenSubmissionClickListener, onOpenDetailsClickListener, expandedState, resources)
76 .id(Objects.hash(trackerItemViewModel.type, DashboardTrackerExpandedEpoxyModel::class.java.name))
77 .addIf(trackerItemViewModel.isToday && (
78 (expandedState == DashboardExpandedState.USER_EXPANDED ||
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardEpoxyController.kt:79:37Line detected, which is longer than the defined maximum line length in the code style.
76 .id(Objects.hash(trackerItemViewModel.type, DashboardTrackerExpandedEpoxyModel::class.java.name))
77 .addIf(trackerItemViewModel.isToday && (
78 (expandedState == DashboardExpandedState.USER_EXPANDED ||
79 expandedState == DashboardExpandedState.DEFAULT && trackerItemViewModel.isExpandedByDefault)), this)
80
81 DashboardTrackerStepsTooltipEpoxyModel(onStepsLearnMoreClickListener, onStepsGotItClickListener, resources)
82 .id(Objects.hash(trackerItemViewModel.type, DashboardTrackerStepsTooltipEpoxyModel::class.java.name))
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardEpoxyController.kt:82:21Line detected, which is longer than the defined maximum line length in the code style.
79 expandedState == DashboardExpandedState.DEFAULT && trackerItemViewModel.isExpandedByDefault)), this)
80
81 DashboardTrackerStepsTooltipEpoxyModel(onStepsLearnMoreClickListener, onStepsGotItClickListener, resources)
82 .id(Objects.hash(trackerItemViewModel.type, DashboardTrackerStepsTooltipEpoxyModel::class.java.name))
83 .addIf(trackerItemViewModel.type == OrigamiTrackerType.STEPS && trackerItemViewModel.showInfoTip, this)
84
85 DashboardTrackerDividerEpoxyModel()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardEpoxyController.kt:83:21Line detected, which is longer than the defined maximum line length in the code style.
80
81 DashboardTrackerStepsTooltipEpoxyModel(onStepsLearnMoreClickListener, onStepsGotItClickListener, resources)
82 .id(Objects.hash(trackerItemViewModel.type, DashboardTrackerStepsTooltipEpoxyModel::class.java.name))
83 .addIf(trackerItemViewModel.type == OrigamiTrackerType.STEPS && trackerItemViewModel.showInfoTip, this)
84
85 DashboardTrackerDividerEpoxyModel()
86 .id(Objects.hash(trackerItemViewModel.type, DashboardTrackerDividerEpoxyModel::class.java.name))
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardEpoxyController.kt:105:5Line detected, which is longer than the defined maximum line length in the code style.
102 val expandedState: DashboardExpandedState,
103 val resources: Resources,
104 val gdtConfiguration: GDTConfiguration
105 ) : ViewBindingKotlinModel<ItemDashboardTrackerViewCollapsedBinding>(R.layout.item_dashboard_tracker_view_collapsed) {
106
107 override fun ItemDashboardTrackerViewCollapsedBinding.bind() {
108 with(this) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardEpoxyController.kt:109:17Line detected, which is longer than the defined maximum line length in the code style.
106
107 override fun ItemDashboardTrackerViewCollapsedBinding.bind() {
108 with(this) {
109 val isEditable = !trackerItemViewModel.selectedDate.isBefore(DateTime.now().withTimeAtStartOfDay().minusDays(gdtConfiguration.getUpdatableDays()))
110 imageViewAction.isVisible = isEditable
111 imageViewAction.setTint(R.color.type_medium)
112 trackerLayout.setOnClickListener {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardEpoxyController.kt:124:33Line detected, which is longer than the defined maximum line length in the code style.
121 descriptionTextView.text = trackerItemViewModel.subtitleContainer.provideDescription(resources)
122 extendedPrettyfier.isVisible = trackerItemViewModel.isToday && (
123 (expandedState == DashboardExpandedState.USER_EXPANDED ||
124 expandedState == DashboardExpandedState.DEFAULT && trackerItemViewModel.isExpandedByDefault))
125 }
126 }
127
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardEpoxyController.kt:160:17Line detected, which is longer than the defined maximum line length in the code style.
157 with(this) {
158 expandedArea.setOnClickListener { onOpenDetailsClickListener?.onItemClick(trackerItemViewModel.type) }
159 seeMoreButton.setOnClickListener { onOpenDetailsClickListener?.onItemClick(trackerItemViewModel.type) }
160 chartTitle.text = trackerItemViewModel.chartDescriptionContainer.provideDescription(chartTitle.context.resources)
161 chartWebView.setBackgroundColor(ContextCompat.getColor(chartWebView.context, com.sharecare.realgreen.origami.R.color.surface))
162 with(chartWebView) {
163 if (!trackerItemViewModel.vegaSpec.isNullOrEmpty()) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardEpoxyController.kt:161:17Line detected, which is longer than the defined maximum line length in the code style.
158 expandedArea.setOnClickListener { onOpenDetailsClickListener?.onItemClick(trackerItemViewModel.type) }
159 seeMoreButton.setOnClickListener { onOpenDetailsClickListener?.onItemClick(trackerItemViewModel.type) }
160 chartTitle.text = trackerItemViewModel.chartDescriptionContainer.provideDescription(chartTitle.context.resources)
161 chartWebView.setBackgroundColor(ContextCompat.getColor(chartWebView.context, com.sharecare.realgreen.origami.R.color.surface))
162 with(chartWebView) {
163 if (!trackerItemViewModel.vegaSpec.isNullOrEmpty()) {
164 // if the chart and it's type ave valid – we show the chart area
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardEpoxyController.kt:172:33Line detected, which is longer than the defined maximum line length in the code style.
169 isVerticalScrollBarEnabled = false
170 webViewClient = object : WebViewClient() {
171 override fun onPageFinished(view: WebView, url: String) {
172 val urlToLoad = "javascript:(window.render(${trackerItemViewModel.vegaSpec},{type: '${VegaSpecBuilder.ChartPageType.DASHBOARD.chartTypeName}', locale:'${trackerItemViewModel.provideRegionString()}'}))()"
173 if (view.url != urlToLoad) {
174 view.loadUrl(urlToLoad)
175 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardEpoxyController.kt:196:5Line detected, which is longer than the defined maximum line length in the code style.
193 }
194 }
195
196 data class DashboardTrackerDividerEpoxyModel(val isVisible: Boolean = true) : ViewBindingKotlinModel<ItemDashboardTrackerDividerBinding>(R.layout.item_dashboard_tracker_divider) {
197 override fun ItemDashboardTrackerDividerBinding.bind() {
198 divider.isVisible = isVisible
199 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardEpoxyController.kt:203:42Line detected, which is longer than the defined maximum line length in the code style.
200 }
201
202 data class DashboardHeaderEpoxyModel(val viewLifecycleOwner: LifecycleOwner,
203 val onClickListener: DashboardHeaderView.OnClickListener) : ViewBindingKotlinModel<ItemDashboardHeaderViewBinding>(R.layout.item_dashboard_header_view) {
204 override fun ItemDashboardHeaderViewBinding.bind() {
205 dashboardHeader.attachOnClickListener(onClickListener)
206 dashboardHeader.attachLifecycleOwner(viewLifecycleOwner)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardEpoxyController.kt:212:55Line detected, which is longer than the defined maximum line length in the code style.
209
210 data class DashboardTrackerStepsTooltipEpoxyModel(val onStepsLearnMoreClickListener: View.OnClickListener? = null,
211 val onStepsGotItClickListener: View.OnClickListener? = null,
212 val resources: Resources) : ViewBindingKotlinModel<ItemDashboardTrackerTooltipBinding>(R.layout.item_dashboard_tracker_tooltip) {
213 override fun ItemDashboardTrackerTooltipBinding.bind() {
214 with(this) {
215 tooltipContainer.isVisible = true
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardEpoxyController.kt:218:17Line detected, which is longer than the defined maximum line length in the code style.
215 tooltipContainer.isVisible = true
216 learnMoreButton.setText(R.string.learn_more)
217 gotItButton.setText(R.string.btn_got_it)
218 tipText.text = resources.getString(R.string.tracker_set_to_automatic_plural).replace("{placeholder}", resources.getString(OrigamiTrackerType.STEPS.getTrackerTitleResource()))
219 learnMoreButton.setOnClickListener(onStepsLearnMoreClickListener)
220 gotItButton.setOnClickListener(onStepsGotItClickListener)
221 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardEpoxyController.kt:225:5Line detected, which is longer than the defined maximum line length in the code style.
222 }
223 }
224
225 data class DashboardLoaderEpoxyModel(val isVisible: Boolean = true) : ViewBindingKotlinModel<ItemDashboardLoaderViewBinding>(R.layout.item_dashboard_loader_view) {
226 override fun ItemDashboardLoaderViewBinding.bind() {
227 progressBar.isVisible = isVisible
228 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardEpoxyController.kt:248:9Line detected, which is longer than the defined maximum line length in the code style.
245 }
246
247 companion object {
248 val CACHED_ITEM_SIZE: Int = 2 + 3 * OrigamiTrackerType.values().size // header + loader + all tracker types (3 models each)
249 }
250 }
251
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardListViewModel.kt:61:6Line detected, which is longer than the defined maximum line length in the code style.
58 val toolTipParams: LiveData<Pair<Boolean, DashboardEpoxyController.DashboardExpandedState>>
59
60 /**
61 * Current state of the cards: expanded by user or collapsed by user (default value allows us to rely on the expanded/collapsed values provided by the server)
62 */
63 val isExpanded: LiveData<DashboardEpoxyController.DashboardExpandedState>
64
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardListViewModel.kt:111:6Line detected, which is longer than the defined maximum line length in the code style.
108 val shouldNavigateToStepsInfo: NavigationLiveData
109
110 /**
111 * A trigger to navigate to the Alcohol conditional page that will ask a user if they want to update their configuration
112 */
113 val shouldNavigateToAlcoholConditionalUpdateScreen: NavigationLiveData
114
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardListViewModel.kt:116:6Line detected, which is longer than the defined maximum line length in the code style.
113 val shouldNavigateToAlcoholConditionalUpdateScreen: NavigationLiveData
114
115 /**
116 * A trigger to navigate to the Blood Glucose conditional page that will ask a user if they want to update their configuration
117 */
118 val shouldNavigateToBloodGlucoseConditionalUpdateScreen: NavigationLiveData
119
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardListViewModel.kt:121:6Line detected, which is longer than the defined maximum line length in the code style.
118 val shouldNavigateToBloodGlucoseConditionalUpdateScreen: NavigationLiveData
119
120 /**
121 * A trigger to navigate to the Smoke conditional page that will ask a user if they want to update their configuration
122 */
123 val shouldNavigateToSmokeConditionalUpdateScreen: NavigationLiveData
124
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardListViewModel.kt:126:6Line detected, which is longer than the defined maximum line length in the code style.
123 val shouldNavigateToSmokeConditionalUpdateScreen: NavigationLiveData
124
125 /**
126 * A trigger to navigate to the Medication conditional page that will ask a user if they want to update their configuration
127 */
128 val shouldNavigateToMedicationConditionalScreen: NavigationLiveData
129
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardListViewModel.kt:247:5Line detected, which is longer than the defined maximum line length in the code style.
244 greenDayRepository.getGreenDay(it ?: DateTime.now().toTrackerDateString())
245 }
246
247 private val unitsOfMeasurement: LiveData<List<TrackerMeasurement>> = trackerMeasurementRepository.getAllMeasurements()
248
249 private val charts: LiveData<List<TrackerTrendChart>> = greenDayRepository.getAllTrendCharts().combineLatest(unitsOfMeasurement).map {
250 val charts = it.first
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardListViewModel.kt:249:5Line detected, which is longer than the defined maximum line length in the code style.
246
247 private val unitsOfMeasurement: LiveData<List<TrackerMeasurement>> = trackerMeasurementRepository.getAllMeasurements()
248
249 private val charts: LiveData<List<TrackerTrendChart>> = greenDayRepository.getAllTrendCharts().combineLatest(unitsOfMeasurement).map {
250 val charts = it.first
251 val unitsOfMeasurement = it.second
252 charts.filter { it.trackerType != null }.forEach { trendChart ->
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardListViewModel.kt:254:13Line detected, which is longer than the defined maximum line length in the code style.
251 val unitsOfMeasurement = it.second
252 charts.filter { it.trackerType != null }.forEach { trendChart ->
253 val measurementType = trendChart.trackerType?.getMeasurementTypes()?.firstOrNull()
254 val measurementUnit = measurementType?.let { unitsOfMeasurement.find { it.measurementType == measurementType } }
255 trendChart.unitOfMeasure = measurementUnit?.unit
256 }
257 charts
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardListViewModel.kt:277:5Line detected, which is longer than the defined maximum line length in the code style.
274 Pair(greenDay?.dateKey?.toTrackerDate(), greenDay?.greenDayTrackers)
275 }
276
277 private val minMaxBounds: LiveData<Map<OrigamiTrackerType, Pair<Int, Int>>> = trackerMeasurementRepository.provideMinMaxBoundsForAllTrackerTypes()
278
279
280 private val _trackerItems: LiveData<List<TrackerItemViewModel>?> =
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardListViewModel.kt:287:25Line detected, which is longer than the defined maximum line length in the code style.
284 .combineLatest(minMaxBounds)
285 .asFlow()
286 .map {
287 val dateKey: DateTime = it.first.first.first.first?.first ?: DateTime.now().withTimeAtStartOfDay()
288 val greenDayTrackers: List<GreenDayTracker>? = it.first.first.first.first?.second
289 val isGreenDayUpdatable: Boolean? = it.first.first.first.second
290 val charts: List<TrackerTrendChart>? = it.first.first.first.third
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardListViewModel.kt:313:45Line detected, which is longer than the defined maximum line length in the code style.
310 colorsMap!!,
311 VegaSpecBuilder.ChartPageType.DASHBOARD,
312 market,
313 trackerChart.unitOfMeasure ?: greenDayTracker.riskStratificationDisplay?.displayUnit ?: "",
314 if (minMaxBounds.containsKey(trackerChart.trackerType)) {
315 minMaxBounds[trackerChart.trackerType]
316 } else {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardListViewModel.kt:382:5Line detected, which is longer than the defined maximum line length in the code style.
379 }
380 }
381
382 override val shouldNavigateToSubmissionScreenInCreateMode: TypedNavigationLiveData<DateTime> = TypedNavigationLiveData()
383
384 override val shouldNavigateToSubmissionScreenInEditMode: TypedNavigationLiveData<Pair<TrackerData?, Boolean>> = TypedNavigationLiveData()
385
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardListViewModel.kt:384:5Line detected, which is longer than the defined maximum line length in the code style.
381
382 override val shouldNavigateToSubmissionScreenInCreateMode: TypedNavigationLiveData<DateTime> = TypedNavigationLiveData()
383
384 override val shouldNavigateToSubmissionScreenInEditMode: TypedNavigationLiveData<Pair<TrackerData?, Boolean>> = TypedNavigationLiveData()
385
386 override val shouldNavigateToAlcoholConditionalScreen: NavigationLiveData = NavigationLiveData()
387
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardListViewModel.kt:435:5Line detected, which is longer than the defined maximum line length in the code style.
432 _isExpanded.value = _isExpanded.value?.provideOppositeValue()
433 }
434
435 override fun provideSelectedTrackerTypeOrNull(): OrigamiTrackerType? = sharedPreferencesRepository.getSelectedTrackerTypeOrNull()
436
437 override fun openSubmissionOrConditionalScreen(selectedTrackerType: OrigamiTrackerType) {
438 val configuration =
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardListViewModel.kt:439:17Line detected, which is longer than the defined maximum line length in the code style.
436
437 override fun openSubmissionOrConditionalScreen(selectedTrackerType: OrigamiTrackerType) {
438 val configuration =
439 configurationRepository.getConfigurationSynchronously(sharedPreferencesRepository.getSelectedDate().toTrackerDate()!!)
440 val isTracking = when (selectedTrackerType) {
441 OrigamiTrackerType.ALCOHOL -> configuration?.nonDrinker == false
442 OrigamiTrackerType.BLOOD_GLUCOSE -> configuration?.diabetic == true
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardListViewModel.kt:456:21Line detected, which is longer than the defined maximum line length in the code style.
453 }
454 OrigamiTrackerType.STRESS -> {
455 greenDayTrackers.value?.second?.firstOrNull { it.type?.name == selectedTrackerType.name}?.trackers
456 ?.firstOrNull { it.source != null && it.source!!.sourceType !in listOf(Source.SourceType.FT_VOICE.name, Source.SourceType.FT_VOICE_ANALYZER.name) } != null
457 }
458 else -> {
459 // for the trackers that support only one entry per day we check if we already have an entry
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardListViewModel.kt:461:17Line detected, which is longer than the defined maximum line length in the code style.
458 else -> {
459 // for the trackers that support only one entry per day we check if we already have an entry
460 // if there is an entry –we show an UPDATE screen, otherwise – ADD screen
461 greenDayTrackers.value?.second?.firstOrNull { it.type?.name == selectedTrackerType.name }?.hasAnyTrackers() == true
462 }
463 }
464
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardListViewModel.kt:468:21Line detected, which is longer than the defined maximum line length in the code style.
465 if (configuration?.isConfigurationSetForType(selectedTrackerType) == true) {
466 if (isTracking) {
467 if (shouldOpenUpdateScreen) {
468 val trackerDataPair = provideTrackerDataForEditOrNull(greenDayTrackers.value?.second, selectedTrackerType)
469 shouldNavigateToSubmissionScreenInEditMode.requestNavigationWith(trackerDataPair)
470 } else {
471 shouldNavigateToSubmissionScreenInCreateMode.requestNavigationWith(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardListViewModel.kt:477:21Line detected, which is longer than the defined maximum line length in the code style.
474 } else {
475 when (selectedTrackerType) {
476 OrigamiTrackerType.ALCOHOL -> shouldNavigateToAlcoholConditionalUpdateScreen.requestNavigation()
477 OrigamiTrackerType.BLOOD_GLUCOSE -> shouldNavigateToBloodGlucoseConditionalUpdateScreen.requestNavigation()
478 OrigamiTrackerType.SMOKE -> shouldNavigateToSmokeConditionalUpdateScreen.requestNavigation()
479 }
480 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardListViewModel.kt:497:5Line detected, which is longer than the defined maximum line length in the code style.
494 }
495
496
497 private fun provideTrackerDataForEditOrNull(greenDayTrackers: List<GreenDayTracker>?, selectedTrackerType: OrigamiTrackerType): Pair<TrackerData?, Boolean> {
498 val greenDayTracker = greenDayTrackers?.firstOrNull { it.type?.name == selectedTrackerType.name }
499 val trackerDataList = greenDayTracker?.trackers
500 val isLegacy = greenDayTracker?.isLegacy() ?: true
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardListViewModel.kt:506:21Line detected, which is longer than the defined maximum line length in the code style.
503 trackerDataList?.firstOrNull { it.descriptiveType != DescriptiveType.DIET_PASSIO.description }
504 }
505 OrigamiTrackerType.STRESS -> {
506 trackerDataList?.firstOrNull { it.source?.sourceType !in listOf(Source.SourceType.FT_VOICE.name, Source.SourceType.FT_VOICE_ANALYZER.name) }
507 }
508 else -> {
509 trackerDataList?.firstOrNull()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardListViewModelFactory.kt:35:25Line detected, which is longer than the defined maximum line length in the code style.
32 override fun <T : ViewModel> create(modelClass: Class<T>): T {
33 return DashboardListViewModelImpl(
34 GreenDayRepositoryImpl(
35 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
36 Origami.getDatabaseInstance().greenDayModel()
37 ),
38 ConfigurationRepositoryImpl(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardListViewModelFactory.kt:39:25Line detected, which is longer than the defined maximum line length in the code style.
36 Origami.getDatabaseInstance().greenDayModel()
37 ),
38 ConfigurationRepositoryImpl(
39 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
40 Origami.getDatabaseInstance().trackerConfigurationModel(),
41 OrigamiSharedPreferencesRepositoryImpl(Origami.sharedPreferences!!)
42 ),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardListViewModelFactory.kt:46:25Line detected, which is longer than the defined maximum line length in the code style.
43 LiveSharedPreferencesRepositoryImpl(Origami.liveSharedPreferences!!),
44 OrigamiSharedPreferencesRepositoryImpl(Origami.sharedPreferences!!),
45 UserSettingsRepositoryImpl(
46 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.USER_SETTINGS) as UserSettingsService,
47 OrigamiSharedPreferencesRepositoryImpl(Origami.sharedPreferences!!)
48 ),
49 TrackerRepositoryImpl(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardListViewModelFactory.kt:50:25Line detected, which is longer than the defined maximum line length in the code style.
47 OrigamiSharedPreferencesRepositoryImpl(Origami.sharedPreferences!!)
48 ),
49 TrackerRepositoryImpl(
50 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
51 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
52 Origami.getDatabaseInstance().trackerModel(),
53 Origami.getDatabaseInstance().greenDayModel(),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardListViewModelFactory.kt:51:25Line detected, which is longer than the defined maximum line length in the code style.
48 ),
49 TrackerRepositoryImpl(
50 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
51 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
52 Origami.getDatabaseInstance().trackerModel(),
53 Origami.getDatabaseInstance().greenDayModel(),
54 Origami.getDatabaseInstance().trackerHistoryModel()),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardListViewModelFactory.kt:56:25Line detected, which is longer than the defined maximum line length in the code style.
53 Origami.getDatabaseInstance().greenDayModel(),
54 Origami.getDatabaseInstance().trackerHistoryModel()),
55 TrackerMeasurementRepositoryImpl(
56 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
57 Origami.getDatabaseInstance().trackerMeasurementModel()
58
59 ),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/DashboardListViewModelFactory.kt:60:17Line detected, which is longer than the defined maximum line length in the code style.
57 Origami.getDatabaseInstance().trackerMeasurementModel()
58
59 ),
60 ConfigurationManager().getConfiguration().getFeatureConfiguration(FeatureConfigurationType.GDT) as GDTConfiguration,
61 ConfigurationManager().getConfiguration().getMarket()
62 ) as T
63 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/itemview/model/ChartDescriptionContainer.kt:9:1Line detected, which is longer than the defined maximum line length in the code style.
6 import com.sharecare.realgreen.origami.tool.TrackerDateUtil
7 import org.joda.time.DateTime
8
9 class ChartDescriptionContainer(private val timeFrameType: TimeFrameType?, private val lastUpdated: DateTime?, private val isChartEmpty: Boolean) {
10 private val daysCount: Int = when (timeFrameType) {
11 TimeFrameType.WEEKLY -> 7
12 TimeFrameType.MONTHLY -> 30
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/itemview/model/ChartDescriptionContainer.kt:33:17Line detected, which is longer than the defined maximum line length in the code style.
30 }
31 if (lastUpdated != null) {
32 sb.append(" ")
33 sb.append(resources.getString(R.string.origami_dashboard_chart_last_update, TrackerDateUtil.getDashboardHeaderText(resources, lastUpdated)))
34 }
35 }
36 return sb.toString()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/itemview/viewmodel/TrackerItemViewModel.kt:50:6Line detected, which is longer than the defined maximum line length in the code style.
47 val iconRes: Int
48
49 /**
50 * A color resource used for the tint of the icon (so we can use a single icon per tracker and just change the tint of it)
51 */
52 val tintRes: Int
53
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/itemview/viewmodel/TrackerItemViewModel.kt:61:6Line detected, which is longer than the defined maximum line length in the code style.
58
59 /**
60 * A container that is used to construct a description
61 * Description is a complex text that varies depending on many conditions, so this container accumulates all possible cases
62 */
63 val subtitleContainer: DescriptionContainer
64
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/itemview/viewmodel/TrackerItemViewModel.kt:188:21Line detected, which is longer than the defined maximum line length in the code style.
185 } else {
186 when (provideTrackerViewType()) {
187 TrackerViewType.RISK_STRATIFIED -> {
188 // medications, relationship, diet and stress trackers or trackers with no data to use labelKey/labelText
189 if (greenDayTracker.type in
190 listOf(OrigamiTrackerType.MEDICATION_GROUP, OrigamiTrackerType.RELATIONSHIP, OrigamiTrackerType.DIET, OrigamiTrackerType.STRESS)
191 || greenDayTracker.hasNoTrackers()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/itemview/viewmodel/TrackerItemViewModel.kt:190:25Line detected, which is longer than the defined maximum line length in the code style.
187 TrackerViewType.RISK_STRATIFIED -> {
188 // medications, relationship, diet and stress trackers or trackers with no data to use labelKey/labelText
189 if (greenDayTracker.type in
190 listOf(OrigamiTrackerType.MEDICATION_GROUP, OrigamiTrackerType.RELATIONSHIP, OrigamiTrackerType.DIET, OrigamiTrackerType.STRESS)
191 || greenDayTracker.hasNoTrackers()
192 ) {
193 if (!greenDayTracker.riskStratificationDisplay?.labelKey.isNullOrEmpty()) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/itemview/viewmodel/TrackerItemViewModel.kt:224:21Line detected, which is longer than the defined maximum line length in the code style.
221 )
222 }
223 // custom layout for blood pressure "sys/dia"
224 else if (greenDayTracker.type == OrigamiTrackerType.BLOOD_PRESSURE && trackerData is BloodPressureTrackerData) {
225 provideDescriptionContainerWithAdditionalText(
226 DescriptionContainer(
227 Pair(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/itemview/viewmodel/TrackerItemViewModel.kt:280:25Line detected, which is longer than the defined maximum line length in the code style.
277 ) {
278 DescriptionContainer(trackerData!!.value)
279 } else {
280 val legacyDescriptionRes = DashboardLegacyTrackerDetailsUtil.provideLegacyDescriptionRes(greenDayTracker)
281 if (legacyDescriptionRes != null) {
282 DescriptionContainer(legacyDescriptionRes)
283 } else {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/itemview/viewmodel/TrackerItemViewModel.kt:292:5Line detected, which is longer than the defined maximum line length in the code style.
289 }
290 }
291
292 private fun provideDescriptionContainerWithAdditionalText(descriptionContainer: DescriptionContainer): DescriptionContainer =
293 if (!greenDayTracker.riskStratificationDisplay?.labelKey.isNullOrEmpty()) {
294 descriptionContainer.withAdditionalText(
295 LabelKey.fromString(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/itemview/viewmodel/TrackerItemViewModelFactory.kt:30:17Line detected, which is longer than the defined maximum line length in the code style.
27 isConfigSetAndTracking: Boolean = true
28 ): TrackerItemViewModel =
29 when (greenDayTracker.type) {
30 OrigamiTrackerType.STEPS -> StepsItemViewModel(greenDayTracker, selectedDate, isUpdatable, hasPendingChanges,
31 shouldShowStepsInfoTip, trackerChart, market, vegaSpec)
32 else -> TrackerItemViewModelImpl(greenDayTracker, selectedDate, isUpdatable, hasPendingChanges, trackerChart, market,
33 vegaSpec, isConfigSetAndTracking)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/list/itemview/viewmodel/TrackerItemViewModelFactory.kt:32:17Line detected, which is longer than the defined maximum line length in the code style.
29 when (greenDayTracker.type) {
30 OrigamiTrackerType.STEPS -> StepsItemViewModel(greenDayTracker, selectedDate, isUpdatable, hasPendingChanges,
31 shouldShowStepsInfoTip, trackerChart, market, vegaSpec)
32 else -> TrackerItemViewModelImpl(greenDayTracker, selectedDate, isUpdatable, hasPendingChanges, trackerChart, market,
33 vegaSpec, isConfigSetAndTracking)
34 }
35 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/tooltip/DashboardToolTipInteractor.kt:52:6Line detected, which is longer than the defined maximum line length in the code style.
49 * - the first item of the list of trackers
50 * - the three dots menu item for the info
51 *
52 * If any problem happens to those views, they won't be added to the list and that particular tooltip will not be shown
53 */
54 fun initMainTooltipsAndShow() {
55 cancelTooltips()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/tooltip/DashboardToolTipInteractor.kt:242:5Line detected, which is longer than the defined maximum line length in the code style.
239 R.string.origami_next
240 })
241
242 private fun getTextWithCounter(text: String, index: Int): String = "$text (${index + 1}/${list.size})" // example: "some text (1/5)"
243
244 data class DialogItem(val x: Int, val y: Int, val view: View, val textRes: Int)
245 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/dashboard/tooltip/OrigamiToolTipDialog.kt:105:21Line detected, which is longer than the defined maximum line length in the code style.
102
103 canvas.drawBitmap(viewBitmap,
104 Rect(0, 0, it.measuredWidth, it.measuredHeight),
105 Rect(xy[0], xy[1] - statusBarHeight, xy[0] + it.measuredWidth, xy[1] + it.measuredHeight - statusBarHeight),
106 null)
107 }
108
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/DetailsFragment.kt:80:5Line detected, which is longer than the defined maximum line length in the code style.
77
78 private val chartViewModel: ChartViewModel by viewModels<ChartViewModelImpl> { ChartViewModelFactory() }
79
80 private val navigationViewModel: NavigationViewModel by viewModels<NavigationViewModelImpl> { NavigationViewModelFactory() }
81
82 private val historyViewModel: HistoryViewModel by viewModels<HistoryViewModelImpl> { HistoryViewModelFactory() }
83
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/DetailsFragment.kt:136:13Line detected, which is longer than the defined maximum line length in the code style.
133 chartViewModel.refreshCharts()
134 }
135 binding.primaryButton.setOnClickListener {
136 navigationViewModel.openSubmissionOrConditionalScreen(DateTime.now().withTimeAtStartOfDay(), SubmissionOpenedFrom.DETAILS_PRIMARY_CTA)
137 }
138 binding.secondaryButton.setOnClickListener {
139 navigationViewModel.shouldNavigateToMedicationCabinetScreen.requestNavigation()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/DetailsFragment.kt:145:17Line detected, which is longer than the defined maximum line length in the code style.
142 setToggleItemOnClick(false)
143 layoutManager = LinearLayoutManager(context)
144 adapter = HistoryAdapter(context, listOf(), {
145 navigationViewModel.openSubmissionOrConditionalScreen(it ?: DateTime.now().withTimeAtStartOfDay(), SubmissionOpenedFrom.HISTORY_LIST_ITEM)
146 }, {
147 if (it?.type == OrigamiTrackerType.MEDICATION_GROUP) {
148 navigationViewModel.shouldNavigateToMedicationSubmissionScreen.requestNavigationWith(it)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/DetailsFragment.kt:150:21Line detected, which is longer than the defined maximum line length in the code style.
147 if (it?.type == OrigamiTrackerType.MEDICATION_GROUP) {
148 navigationViewModel.shouldNavigateToMedicationSubmissionScreen.requestNavigationWith(it)
149 } else {
150 navigationViewModel.shouldNavigateToSubmissionScreenInEditMode.requestNavigationWith(Pair(it, SubmissionOpenedFrom.HISTORY_LIST_ITEM))
151 }
152
153 }, {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/DetailsFragment.kt:170:29Line detected, which is longer than the defined maximum line length in the code style.
167 ?.start()
168 }
169 // if we have just expanded a month – request an update from the server
170 if (item.expandedState == MultilevelState.EXPANDED && (item as? MonthCell) != null && item.dateTimeStart != null) {
171 historyViewModel.refreshHistoryForMonth(item.dateTimeStart)
172 }
173 } else {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/DetailsFragment.kt:175:33Line detected, which is longer than the defined maximum line length in the code style.
172 }
173 } else {
174 with(item as HistoryCell) {
175 if (this is DayCell && dailyTracker?.greenDayValue == 0 && dailyTracker?.dateKey?.isToday() == true &&
176 dailyTracker?.type == OrigamiTrackerType.MEDICATION_GROUP
177 ) {
178 navigationViewModel.openMedicationOrConditionalScreen()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/DetailsFragment.kt:204:13Line detected, which is longer than the defined maximum line length in the code style.
201 binding.infoBlock.initWithType(it)
202 binding.chartWebView.updateWithTrackerType(it)
203 }
204 binding.historySubtitle.setText(getString(R.string.origami_history_subtitle, historyViewModel.provideUpdatableDays().toString()))
205 binding.historySubtitle.visible = historyViewModel.provideUpdatableDays() != 0
206 }
207 // allows the inner view model of the calendar chart view to do it's job
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/DetailsFragment.kt:270:9Line detected, which is longer than the defined maximum line length in the code style.
267 BinaryConditionalFragment.startForAlcoholFromDetails(this.getNavigationController(), param)
268 }
269 }
270 navigationViewModel.shouldNavigateToBloodGlucoseConditionalScreen.observe(viewLifecycleOwner) { param: DateTime? ->
271 param?.let { param ->
272 BinaryConditionalFragment.startForBloodGlucoseFromDetails(this.getNavigationController(), param)
273 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/DetailsFragment.kt:330:9Line detected, which is longer than the defined maximum line length in the code style.
327 historyViewModel.idForJobScheduler.observe(viewLifecycleOwner) { id ->
328 TrackerSyncWorker.scheduleOneTimeTrackerSyncJob(requireContext(), id)
329 }
330 navigationViewModel.shouldNavigateToSubmissionScreenInEditMode.observe(viewLifecycleOwner) { param: Pair<TrackerItem?, SubmissionOpenedFrom>? ->
331 val trackerItem = param?.first
332 val submissionOpenedFrom = param?.second
333
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/DetailsFragment.kt:334:13Line detected, which is longer than the defined maximum line length in the code style.
331 val trackerItem = param?.first
332 val submissionOpenedFrom = param?.second
333
334 // we can open the submission screen in any case except when we are offline we are trying to open a voice stress tracker entry
335 val canOpenNextScreen = trackerItem != null && submissionOpenedFrom != null &&
336 (NetworkUtil.isNetworkAvailable(requireContext()) &&
337 trackerItem.provideValuesForEdit().containsKey(TrackerMeasurement.SubmissionMeasurementType.STRESS_VOICE) ||
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/DetailsFragment.kt:337:29Line detected, which is longer than the defined maximum line length in the code style.
334 // we can open the submission screen in any case except when we are offline we are trying to open a voice stress tracker entry
335 val canOpenNextScreen = trackerItem != null && submissionOpenedFrom != null &&
336 (NetworkUtil.isNetworkAvailable(requireContext()) &&
337 trackerItem.provideValuesForEdit().containsKey(TrackerMeasurement.SubmissionMeasurementType.STRESS_VOICE) ||
338 !trackerItem.provideValuesForEdit().containsKey(TrackerMeasurement.SubmissionMeasurementType.STRESS_VOICE))
339
340 if (canOpenNextScreen) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/DetailsFragment.kt:338:21Line detected, which is longer than the defined maximum line length in the code style.
335 val canOpenNextScreen = trackerItem != null && submissionOpenedFrom != null &&
336 (NetworkUtil.isNetworkAvailable(requireContext()) &&
337 trackerItem.provideValuesForEdit().containsKey(TrackerMeasurement.SubmissionMeasurementType.STRESS_VOICE) ||
338 !trackerItem.provideValuesForEdit().containsKey(TrackerMeasurement.SubmissionMeasurementType.STRESS_VOICE))
339
340 if (canOpenNextScreen) {
341 showTrackerSubmissionInEditModeFragment(trackerItem!!, submissionOpenedFrom!!)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/DetailsFragment.kt:345:9Line detected, which is longer than the defined maximum line length in the code style.
342 }
343 }
344
345 navigationViewModel.shouldNavigateToMedicationSubmissionScreen.observe(viewLifecycleOwner) { param: TrackerItem? ->
346 if (param != null) {
347 showMedicationIntakeOptions(param)
348 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/DetailsFragment.kt:358:9Line detected, which is longer than the defined maximum line length in the code style.
355 historyViewModel.trackerItemsUpdater.observe(viewLifecycleOwner) {}
356
357
358 navigationViewModel.shouldNavigateToSubmissionScreenInCreateMode.observe(viewLifecycleOwner) { param: DateTime? ->
359 showTrackerSubmissionFragment(param ?: DateTime.now())
360 }
361 if (NetworkUtil.isNetworkAvailable(requireContext())) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/DetailsFragment.kt:409:5Line detected, which is longer than the defined maximum line length in the code style.
406 }
407 }
408
409 private fun showTrackerSubmissionInEditModeFragment(trackerItem: TrackerItem, submissionOpenedFrom: SubmissionOpenedFrom) {
410 historyViewModel.provideSelectedTrackerTypeOrNull()?.let {
411 SubmissionFragment.startToEditTracker(
412 this.getNavigationController(),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/DetailsFragment.kt:414:17Line detected, which is longer than the defined maximum line length in the code style.
411 SubmissionFragment.startToEditTracker(
412 this.getNavigationController(),
413 it,
414 if (trackerItem.type == OrigamiTrackerType.MEDICATION_GROUP) (trackerItem.measure as MedicationMeasure).medicationGroupId else trackerItem.id,
415 trackerItem.extId,
416 trackerItem.provideValuesForEdit(),
417 trackerItem.dateKey,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/chart/ChartViewModel.kt:100:5Line detected, which is longer than the defined maximum line length in the code style.
97 private val sharedPreferencesRepository: OrigamiSharedPreferencesRepository,
98 private val greenDayRepository: GreenDayRepository,
99 private val market: Market) : ViewModel(), ChartViewModel {
100 override val selectedTrackerType: LiveData<OrigamiTrackerType?> = liveSharedPreferencesRepository.getSelectedTrackerTypeAsLiveData().mapSkipNulls {
101 refreshCharts()
102 shouldUpdateAverageValueString.requestNavigation()
103 it
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/chart/ChartViewModel.kt:133:5Line detected, which is longer than the defined maximum line length in the code style.
130 getSelectedInterval(selectedDate.toTrackerDate()!!, selectedTimeFrameType)
131 }
132
133 override val chart: LiveData<TrackerChart?> = combineLatest(interval, selectedTrackerType, selectedTimeFrameType).switchMap {
134 val interval: Interval? = it.first
135 val selectedTrackerType: OrigamiTrackerType? = it.second
136 val selectedTimeFrameType: TimeFrameType? = it.third
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/chart/ChartViewModelFactory.kt:24:25Line detected, which is longer than the defined maximum line length in the code style.
21 return ChartViewModelImpl(LiveSharedPreferencesRepositoryImpl(Origami.liveSharedPreferences!!),
22 OrigamiSharedPreferencesRepositoryImpl(Origami.sharedPreferences!!),
23 GreenDayRepositoryImpl(
24 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
25 Origami.getDatabaseInstance().greenDayModel()),
26 ConfigurationManager().getConfiguration().getMarket()) as T
27 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/chart/calendar/ChartCalendarView.kt:25:5Line detected, which is longer than the defined maximum line length in the code style.
22 class ChartCalendarView(context: Context, attrs: AttributeSet?) : LinearLayout(context, attrs), ResProvider,
23 ChartCalendarViewModelAccessor by ChartCalendarViewModelInjector(context, attrs) {
24
25 private val binding: ViewChartCalendarBinding = ViewChartCalendarBinding.inflate(LayoutInflater.from(context), this, true)
26
27 fun initWithTrackerType(origamiTrackerType: OrigamiTrackerType) {
28 viewModel.initTrackerTypeIfNeeded(origamiTrackerType)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/chart/calendar/ChartCalendarView.kt:43:13Line detected, which is longer than the defined maximum line length in the code style.
40 val labelsBelowIcon = uiConfiguration?.labelsBelowIcon
41
42 // if all three datums are not null – set up the day view holders with the most recent data
43 if (!dateString.isNullOrEmpty() && !dateProgramStartedString.isNullOrEmpty() && !dayEntries.isNullOrEmpty() && labelsAboveIcon != null && labelsBelowIcon != null) {
44 initDaysOfWeek(labelsAboveIcon)
45
46 // if the amount of days equals to the days in a week – we show it as a week, otherwise – as a month
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/chart/calendar/ChartCalendarViewModel.kt:35:6Line detected, which is longer than the defined maximum line length in the code style.
32 */
33 interface ChartCalendarViewModel {
34 /**
35 * A live data with a triple: a selected date, a green day program started date and a list of items for the calendar.
36 * We need all three at a time to handle the state of the days in the calendar. The state relies on the selected date
37 * and the green day program started date for SELECTED, SELECTED_TODAY and DISABLED cases
38 */
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/chart/calendar/ChartCalendarViewModel.kt:36:6Line detected, which is longer than the defined maximum line length in the code style.
33 interface ChartCalendarViewModel {
34 /**
35 * A live data with a triple: a selected date, a green day program started date and a list of items for the calendar.
36 * We need all three at a time to handle the state of the days in the calendar. The state relies on the selected date
37 * and the green day program started date for SELECTED, SELECTED_TODAY and DISABLED cases
38 */
39 val calendarViewUiConfiguration: LiveData<CalendarViewUiConfiguration?>
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/chart/calendar/ChartCalendarViewModel.kt:59:5Line detected, which is longer than the defined maximum line length in the code style.
56
57 private val selectedDate: LivePreference<String> = liveSharedPreferencesRepository.getSelectedDateAsLiveData()
58
59 private val selectedTrackerType: LiveData<OrigamiTrackerType?> = liveSharedPreferencesRepository.getSelectedTrackerTypeAsLiveData()
60
61 private val selectedTimeFrameType: LiveData<TimeFrameType> =
62 liveSharedPreferencesRepository.getSelectedTimeFrameTypeAsLiveData()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/chart/calendar/ChartCalendarViewModel.kt:73:9Line detected, which is longer than the defined maximum line length in the code style.
70 private val chart: LiveData<TrackerChart?> = selectedTrackerType.combineLatest(interval).switchMap {
71 val selectedTrackerType = it.first
72 val interval = it.second
73 val selectedTimeFrameType: TimeFrameType = TimeFrameType.getByName(sharedPreferencesRepository.getSelectedTimeFrameTypeName())
74 greenDayRepository.getDetailChart(selectedTrackerType, interval.start, selectedTimeFrameType)
75 }
76
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/chart/calendar/ChartCalendarViewModel.kt:82:17Line detected, which is longer than the defined maximum line length in the code style.
79 if (origamiTrackerType != null) {
80 val dateTimes = interval.value?.toDateTimes(TimeUnit.DAY)
81 dateTimes?.map { dateTime ->
82 val ratingValue: Int = chart?.points?.lastOrNull { point -> point.dateKey.isSameDate(dateTime) }?.colorKey?.valueEquivalent ?: -1
83 DayEntry(ratingValue, dateTime, origamiTrackerType)
84 }?.toList()
85 } else {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/chart/calendar/ChartCalendarViewModel.kt:90:5Line detected, which is longer than the defined maximum line length in the code style.
87 }
88 }
89
90 private val programStartDate: LivePreference<String> = liveSharedPreferencesRepository.getGreenDayProgramStartDayAsLiveData()
91
92 private val labels = selectedDate.map {
93 val selectedDate = it?.toTrackerDate() ?: DateTime.now().withTimeAtStartOfDay()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/chart/calendar/ChartCalendarViewModel.kt:99:5Line detected, which is longer than the defined maximum line length in the code style.
96 .toList()
97 }
98
99 override val calendarViewUiConfiguration = combineLatest(selectedDate, programStartDate, weekList).combineLatest(labels).map {
100 val selectedDate = it.first.first
101 val programStartDate = it.first.second
102 val weekList = it.first.third
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/chart/calendar/ChartCalendarViewModel.kt:150:17Line detected, which is longer than the defined maximum line length in the code style.
147 if (chart != null) {
148 val dateTimes = getSelectedInterval(selectedDate, chart.period).toDateTimes(TimeUnit.DAY)
149 dateTimes.map { dateTime ->
150 val ratingValue: Int = chart.points.lastOrNull { point -> point.dateKey.isSameDate(dateTime) }?.colorKey?.valueEquivalent ?: -1
151 DayEntry(ratingValue, dateTime, chart.trackerType)
152 }.toList()
153 } else {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/chart/calendar/ChartCalendarViewModel.kt:160:5Line detected, which is longer than the defined maximum line length in the code style.
157
158
159
160 private val programStartDate: LivePreference<String> = liveSharedPreferencesRepository.getGreenDayProgramStartDayAsLiveData()
161
162 private val labels = _selectedDate.map {
163 val selectedDate = it?.toTrackerDate() ?: DateTime.now().withTimeAtStartOfDay()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/chart/calendar/ChartCalendarViewModel.kt:169:5Line detected, which is longer than the defined maximum line length in the code style.
166 .toList()
167 }
168
169 override val calendarViewUiConfiguration = combineLatest(_selectedDate, programStartDate, weekList).combineLatest(labels).map {
170 val selectedDate = it.first.first
171 val programStartDate = it.first.second
172 val weekList = it.first.third
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/chart/calendar/ChartCalendarViewModelFactory.kt:28:25Line detected, which is longer than the defined maximum line length in the code style.
25 override fun <T : ViewModel> create(modelClass: Class<T>): T {
26 return ChartCalendarViewModelImpl(
27 GreenDayRepositoryImpl(
28 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
29 Origami.getDatabaseInstance().greenDayModel()
30 ),
31 LiveSharedPreferencesRepositoryImpl(Origami.liveSharedPreferences!!),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/chart/calendar/ChartCalendarViewModelFactory.kt:45:25Line detected, which is longer than the defined maximum line length in the code style.
42 override fun <T : ViewModel> create(modelClass: Class<T>): T {
43 return TrendChartCalendarViewModelImpl(
44 GreenDayRepositoryImpl(
45 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
46 Origami.getDatabaseInstance().greenDayModel()
47 ),
48 LiveSharedPreferencesRepositoryImpl(Origami.liveSharedPreferences!!),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/chart/calendar/ChartCalendarViewModelFactory.kt:62:1Line detected, which is longer than the defined maximum line length in the code style.
59 * Injects the ViewModel into the chart calendar view view
60 * Use this approach instead of creating the ViewModels directly inside the views
61 */
62 class ChartCalendarViewModelInjector(val context: Context, private val attrs: AttributeSet?) : ChartCalendarViewModelAccessor {
63 private fun providePageType(): VegaSpecBuilder.ChartPageType? {
64 val pageTypeIndex = context.theme.obtainStyledAttributes(attrs, R.styleable.OrigamiCalendarView, 0, 0)
65 .getInteger(R.styleable.OrigamiCalendarView_chartPageType, 1)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/chart/calendar/ChartCalendarViewModelFactory.kt:70:9Line detected, which is longer than the defined maximum line length in the code style.
67 }
68
69 override var viewModel: ChartCalendarViewModel = when (providePageType()) {
70 VegaSpecBuilder.ChartPageType.DASHBOARD -> TrendChartCalendarViewModelFactory().create(TrendChartCalendarViewModelImpl::class.java)
71 else -> ChartCalendarViewModelFactory().create(ChartCalendarViewModelImpl::class.java)
72 }
73
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/chart/calendar/internal/ChartDayHolder.kt:73:5Line detected, which is longer than the defined maximum line length in the code style.
70 setupStyles(currentDay)
71 }
72
73 private fun setupVisibility(calendarMonth: CalendarMonth?, label: String?, itemsValue: Int, origamiTrackerType: OrigamiTrackerType?) {
74 if (linearLayout == null) {
75 return
76 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/chart/calendar/internal/ChartDayHolder.kt:84:13Line detected, which is longer than the defined maximum line length in the code style.
81
82 textView!!.text = label
83 val colorKey = ColorKey.fromValue(itemsValue)
84 imageView!!.setImageDrawable(ContextCompat.getDrawable(linearLayout!!.context, colorKey.provideImageResource(origamiTrackerType)))
85 val colorKeyOverride = if (origamiTrackerType in listOf(OrigamiTrackerType.SMOKE) && colorKey !in listOf(ColorKey.MEDIUM, ColorKey.SCALE_1)) {
86 ColorKey.SCALE_5
87 } else {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/chart/calendar/internal/ChartDayHolder.kt:85:13Line detected, which is longer than the defined maximum line length in the code style.
82 textView!!.text = label
83 val colorKey = ColorKey.fromValue(itemsValue)
84 imageView!!.setImageDrawable(ContextCompat.getDrawable(linearLayout!!.context, colorKey.provideImageResource(origamiTrackerType)))
85 val colorKeyOverride = if (origamiTrackerType in listOf(OrigamiTrackerType.SMOKE) && colorKey !in listOf(ColorKey.MEDIUM, ColorKey.SCALE_1)) {
86 ColorKey.SCALE_5
87 } else {
88 colorKey
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/chart/calendar/internal/ChartMonthView.kt:57:13Line detected, which is longer than the defined maximum line length in the code style.
54 dateProgramStarted: DateTime,
55 dayEntries: List<DayEntry>?) {
56 dayEntries?.let { dayEntries ->
57 val calendarMonth = CalendarMonth(dayEntries.first().dateTime.year, dayEntries.first().dateTime.monthOfYear - 1)
58 for (i in weeks.indices) {
59 val weekOfMonth = i + 1
60 weeks[i]?.displayForMonthView(weekOfMonth, calendarMonth, filterWeekDays(weekOfMonth, calendarMonth), todayDate, dateProgramStarted,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/chart/calendar/internal/ChartMonthView.kt:60:17Line detected, which is longer than the defined maximum line length in the code style.
57 val calendarMonth = CalendarMonth(dayEntries.first().dateTime.year, dayEntries.first().dateTime.monthOfYear - 1)
58 for (i in weeks.indices) {
59 val weekOfMonth = i + 1
60 weeks[i]?.displayForMonthView(weekOfMonth, calendarMonth, filterWeekDays(weekOfMonth, calendarMonth), todayDate, dateProgramStarted,
61 dayEntries)
62 weeks[i]?.isVisible = weeks[i]?.hasValidDates() == true
63 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/chart/calendar/internal/ChartMonthView.kt:93:17Line detected, which is longer than the defined maximum line length in the code style.
90 */
91 private fun initStyle(context: Context, attrs: AttributeSet?) {
92 val typedArray = context
93 .obtainStyledAttributes(attrs, R.styleable.ScrollCalendar, R.attr.scrollCalendarStyleAttr, R.style.WeekViewStyle)
94 dayStyle = typedArray.getResourceId(R.styleable.ScrollCalendar_dayStyle, 0)
95 currentDayStyle = typedArray.getResourceId(R.styleable.ScrollCalendar_currentDayStyle, 0)
96 selectedDayStyle = typedArray.getResourceId(R.styleable.ScrollCalendar_selectedItemStyle, 0)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/chart/calendar/internal/ChartWeekView.kt:51:17Line detected, which is longer than the defined maximum line length in the code style.
48 */
49 private fun initStyle(context: Context, attrs: AttributeSet?) {
50 val typedArray = context
51 .obtainStyledAttributes(attrs, R.styleable.ScrollCalendar, R.attr.scrollCalendarStyleAttr, R.style.WeekViewStyle)
52 dayStyle = typedArray.getResourceId(R.styleable.ScrollCalendar_dayStyle, 0)
53 currentDayStyle = typedArray.getResourceId(R.styleable.ScrollCalendar_currentDayStyle, 0)
54 selectedDayStyle = typedArray.getResourceId(R.styleable.ScrollCalendar_selectedItemStyle, 0)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/chart/calendar/internal/ChartWeekView.kt:87:13Line detected, which is longer than the defined maximum line length in the code style.
84 val calendarDay = CalendarDay(dayEntries[i].dateTime.dayOfMonth).apply {
85 state = getStateForDate(todayDate, dateProgramStarted, dayEntries[i].dateTime)
86 }
87 days[i]?.display(calendarMonth, calendarDay, labels[i], dayEntries[i].ratingValue, dayEntries[i].origamiTrackerType)
88 }
89 }
90
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/chart/util/VegaSpecBuilder.kt:105:9Line detected, which is longer than the defined maximum line length in the code style.
102 }
103
104 // represents a width of a period in the bar/range-bar charts
105 val barPeriodWidth: Int = if (trackerChart.period == TimeFrameType.MONTHLY || chartPageType == ChartPageType.DASHBOARD) {
106 BAR_PERIOD_WIDTH_MONTHLY
107 } else if (trackerChart.period == TimeFrameType.YEARLY) {
108 BAR_PERIOD_WIDTH_YEARLY
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/chart/util/VegaSpecBuilder.kt:135:21Line detected, which is longer than the defined maximum line length in the code style.
132 .toDateTimes(trackerChart.timeUnit)
133 .map { it.toTrackerDateString() }.toList()
134 } else if (chartPageType == ChartPageType.DASHBOARD) {
135 DateRangeHelper.getRangeForDateEndedByToday(DateTime.now().withTimeAtStartOfDay(), trackerChart.period)
136 .toDateTimes(trackerChart.timeUnit)
137 .map { it.toTrackerDateString() }.toList()
138 } else {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/chart/util/VegaSpecBuilder.kt:264:9Line detected, which is longer than the defined maximum line length in the code style.
261 // we need to change the original spec by upserting some fields.
262 // for this we form a so-called dynamic spec map with those fields.
263 // TO DEVELOPER: the following map can look similar to the others and you may want to remove the duplicates,
264 // but please do not do that – the tracker feature has proven that each tracker may become different from the others
265 // in any upcoming release, so it's better to keep some duplications and keep the code readable and understandable.
266 // Also please keep the dynamicSpecMap creation in a single place to keep it less confusing.
267 val dynamicSpecMap: LinkedTreeMap<String, Any> = linkedTreeMapOf(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/chart/util/VegaSpecBuilder.kt:265:9Line detected, which is longer than the defined maximum line length in the code style.
262 // for this we form a so-called dynamic spec map with those fields.
263 // TO DEVELOPER: the following map can look similar to the others and you may want to remove the duplicates,
264 // but please do not do that – the tracker feature has proven that each tracker may become different from the others
265 // in any upcoming release, so it's better to keep some duplications and keep the code readable and understandable.
266 // Also please keep the dynamicSpecMap creation in a single place to keep it less confusing.
267 val dynamicSpecMap: LinkedTreeMap<String, Any> = linkedTreeMapOf(
268 WIDTH to width,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/chart/util/VegaSpecBuilder.kt:352:9Line detected, which is longer than the defined maximum line length in the code style.
349 // we need to change the original spec by upserting some fields.
350 // for this we form a so-called dynamic spec map with those fields.
351 // TO DEVELOPER: the following map can look similar to the others and you may want to remove the duplicates,
352 // but please do not do that – the tracker feature has proven that each tracker may become different from the others
353 // in any upcoming release, so it's better to keep some duplications and keep the code readable and understandable.
354 // Also please keep the dynamicSpecMap creation in a single place to keep it less confusing.
355 val dynamicSpecMap: LinkedTreeMap<String, Any> = linkedTreeMapOf(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/chart/util/VegaSpecBuilder.kt:353:9Line detected, which is longer than the defined maximum line length in the code style.
350 // for this we form a so-called dynamic spec map with those fields.
351 // TO DEVELOPER: the following map can look similar to the others and you may want to remove the duplicates,
352 // but please do not do that – the tracker feature has proven that each tracker may become different from the others
353 // in any upcoming release, so it's better to keep some duplications and keep the code readable and understandable.
354 // Also please keep the dynamicSpecMap creation in a single place to keep it less confusing.
355 val dynamicSpecMap: LinkedTreeMap<String, Any> = linkedTreeMapOf(
356 WIDTH to width,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/chart/util/VegaSpecBuilder.kt:445:9Line detected, which is longer than the defined maximum line length in the code style.
442 // we need to change the original spec by upserting some fields.
443 // for this we form a so-called dynamic spec map with those fields.
444 // TO DEVELOPER: the following map can look similar to the others and you may want to remove the duplicates,
445 // but please do not do that – the tracker feature has proven that each tracker may become different from the others
446 // in any upcoming release, so it's better to keep some duplications and keep the code readable and understandable.
447 // Also please keep the dynamicSpecMap creation in a single place to keep it less confusing.
448 val dynamicSpecMap: LinkedTreeMap<String, Any> = linkedTreeMapOf(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/chart/util/VegaSpecBuilder.kt:446:9Line detected, which is longer than the defined maximum line length in the code style.
443 // for this we form a so-called dynamic spec map with those fields.
444 // TO DEVELOPER: the following map can look similar to the others and you may want to remove the duplicates,
445 // but please do not do that – the tracker feature has proven that each tracker may become different from the others
446 // in any upcoming release, so it's better to keep some duplications and keep the code readable and understandable.
447 // Also please keep the dynamicSpecMap creation in a single place to keep it less confusing.
448 val dynamicSpecMap: LinkedTreeMap<String, Any> = linkedTreeMapOf(
449 WIDTH to width,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/chart/util/VegaSpecBuilder.kt:553:9Line detected, which is longer than the defined maximum line length in the code style.
550 // we need to change the original spec by upserting some fields.
551 // for this we form a so-called dynamic spec map with those fields.
552 // TO DEVELOPER: the following map can look similar to the others and you may want to remove the duplicates,
553 // but please do not do that – the tracker feature has proven that each tracker may become different from the others
554 // in any upcoming release, so it's better to keep some duplications and keep the code readable and understandable.
555 // Also please keep the dynamicSpecMap creation in a single place to keep it less confusing.
556 val dynamicSpecMap: LinkedTreeMap<String, Any> = linkedTreeMapOf(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/chart/util/VegaSpecBuilder.kt:554:9Line detected, which is longer than the defined maximum line length in the code style.
551 // for this we form a so-called dynamic spec map with those fields.
552 // TO DEVELOPER: the following map can look similar to the others and you may want to remove the duplicates,
553 // but please do not do that – the tracker feature has proven that each tracker may become different from the others
554 // in any upcoming release, so it's better to keep some duplications and keep the code readable and understandable.
555 // Also please keep the dynamicSpecMap creation in a single place to keep it less confusing.
556 val dynamicSpecMap: LinkedTreeMap<String, Any> = linkedTreeMapOf(
557 WIDTH to width,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/chart/util/VegaSpecBuilder.kt:610:5Line detected, which is longer than the defined maximum line length in the code style.
607 * Gets a chart-spec in a LinkedTreeMap format from a file.
608 * Or an empty collection if the format is wrong or the file is missing.
609 */
610 private fun specFromVegaMobileCharts(assetsProvider: AssetManager, fileName: String, chartPageType: ChartPageType): LinkedTreeMap<String, Any> {
611 var hashMap = LinkedTreeMap<String, Any>()
612 try {
613 val assetsFile = if (chartPageType == ChartPageType.DASHBOARD) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/chart/util/VegaSpecBuilder.kt:655:5Line detected, which is longer than the defined maximum line length in the code style.
652 * Goes deep until the element is not a LinkedTreeMap.
653 * Upserts all values that are not LinkedTreeMaps (including collections).
654 */
655 private fun recursiveMerge(subSpec: LinkedTreeMap<String, Any>, dynamicSpecEntry: MutableMap.MutableEntry<String, Any>) {
656 (dynamicSpecEntry.value as LinkedTreeMap<String, Any>).entries.forEach { dynamicSpecSubEntry ->
657 if (dynamicSpecSubEntry.value is LinkedTreeMap<*, *> &&
658 subSpec.containsKey(dynamicSpecSubEntry.key) &&
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/chart/util/VegaSpecBuilder.kt:830:13Line detected, which is longer than the defined maximum line length in the code style.
827 DETAILS("historical");
828
829 companion object {
830 fun getByChartTypeName(name: String?): ChartPageType? = values().firstOrNull { it.chartTypeName.equals(name, true) }
831
832 fun getByIndex(index: Int): ChartPageType? = values().firstOrNull { it.ordinal == index }
833 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/chart/web/VegaWebView.kt:78:25Line detected, which is longer than the defined maximum line length in the code style.
75 specToChart.observe(owner) { spec ->
76 binding.chartWebView.webViewClient = object : WebViewClient() {
77 override fun onPageFinished(view: WebView, url: String) {
78 view.loadUrl("javascript:(window.render($spec,{type: '${VegaSpecBuilder.ChartPageType.DETAILS.chartTypeName}', locale:'${provideRegionString()}'}))()")
79 onChartRendered()
80 }
81 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/chart/web/VegaWebViewModel.kt:117:17Line detected, which is longer than the defined maximum line length in the code style.
114 _isProgressbarVisible.value = true
115 val interval = it.first
116 val selectedTrackerType = it.second
117 val selectedTimeFrameType: TimeFrameType = TimeFrameType.getByName(sharedPreferencesRepository.getSelectedTimeFrameTypeName())
118 greenDayRepository.getDetailChart(selectedTrackerType, interval.start, selectedTimeFrameType)
119 }.map { chart ->
120 chart?.let { _isChartVisible.value = it.canBeShown }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/chart/web/VegaWebViewModel.kt:158:17Line detected, which is longer than the defined maximum line length in the code style.
155 val chart = triple.first
156 val measurementUnit = triple.second
157 val minMaxBounds = triple.third
158 if (chart != null && measurementUnit != null && minMaxBounds != null && dimens != null && colorsMap != null && assetManager != null) {
159 VegaSpecBuilder.vegaLiteSpecFromChart(
160 assetManager!!,
161 chart,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/chart/web/VegaWebViewModelFactory.kt:22:25Line detected, which is longer than the defined maximum line length in the code style.
19 override fun <T : ViewModel> create(modelClass: Class<T>): T {
20 return VegaWebViewModelImpl(
21 GreenDayRepositoryImpl(
22 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
23 Origami.getDatabaseInstance().greenDayModel()
24 ),
25 LiveSharedPreferencesRepositoryImpl(Origami.liveSharedPreferences!!),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/chart/web/VegaWebViewModelFactory.kt:28:25Line detected, which is longer than the defined maximum line length in the code style.
25 LiveSharedPreferencesRepositoryImpl(Origami.liveSharedPreferences!!),
26 OrigamiSharedPreferencesRepositoryImpl(Origami.sharedPreferences!!),
27 TrackerMeasurementRepositoryImpl(
28 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
29 Origami.getDatabaseInstance().trackerMeasurementModel()
30
31 ),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/HistoryAdapter.kt:29:22Line detected, which is longer than the defined maximum line length in the code style.
26 historyCells: List<HistoryCell>,
27 private val createAction: (dateKey: DateTime?) -> Unit,
28 private val editAction: (trackerItem: TrackerItem?) -> Unit,
29 private val deleteAction: (trackerItem: TrackerItem?) -> Unit) : MultiLevelAdapter<HistoryCell>(historyCells),
30 RecyclerItemTouchHelperListener {
31
32 private fun setExpandButton(expandButton: ImageView, isExpanded: Boolean) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/HistoryAdapter.kt:33:9Line detected, which is longer than the defined maximum line length in the code style.
30 RecyclerItemTouchHelperListener {
31
32 private fun setExpandButton(expandButton: ImageView, isExpanded: Boolean) {
33 expandButton.setImageResource(if (isExpanded) R.drawable.ic_icon_chevron_up else R.drawable.ic_icon_chevron_down)
34 }
35
36 override fun onCreateActualViewHolder(parent: ViewGroup, viewType: Int): BindableViewHolder<HistoryCell> {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/HistoryAdapter.kt:49:9Line detected, which is longer than the defined maximum line length in the code style.
46 }
47
48 override fun onSwiped(viewHolder: RecyclerView.ViewHolder?, direction: Int, position: Int) {
49 if (viewHolder is Holder && position > 0 && items.size > position && items[position].provideTrackerItemToDeleteOrNull() != null) {
50 val trackerItemToDelete = items[position].provideTrackerItemToDeleteOrNull()!!
51 //Todo: patch fix, this should be updated from the server,
52 if (trackerItemToDelete.type == OrigamiTrackerType.MEDICATION_GROUP) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/HistoryAdapter.kt:64:5Line detected, which is longer than the defined maximum line length in the code style.
61 }
62 }
63
64 internal inner class Holder(private val binding: HistoryItemLayoutBinding) : BindableViewHolder<HistoryCell>(binding.root) {
65 fun getForegroundView() = binding.foregroundView
66
67 override fun onBind(item: HistoryCell) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/HistoryAdapter.kt:237:5Line detected, which is longer than the defined maximum line length in the code style.
234 }
235 }
236
237 private inner class TitleHolder(private val binding: HistoryTitleLayoutBinding) : BindableViewHolder<HistoryCell>(binding.root) {
238 override fun onBind(item: HistoryCell) {
239 binding.title.text = item.provideTitle(context.resources)
240 binding.subtitle.text = item.provideSubtitle(context.resources)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/HistoryAdapter.kt:250:1Line detected, which is longer than the defined maximum line length in the code style.
247 }
248 }
249
250 abstract class MultiLevelAdapter<T>(recyclerViewItems: List<T>) : RootListAdapter<T, BindableViewHolder<T>>(recyclerViewItems)
251
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/HistoryViewModel.kt:78:6Line detected, which is longer than the defined maximum line length in the code style.
75 fun refreshEditableConfigurationsIfNotSetOrNotExist()
76
77 /**
78 * Sometimes we need to update editable tracker items. This watcher allows us to triger that upon some livedata events.
79 */
80 val trackerItemsUpdater: LiveData<Int>
81
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/HistoryViewModel.kt:120:5Line detected, which is longer than the defined maximum line length in the code style.
117 */
118 private var historyGeneratedCells: List<HistoryCell>? = null
119
120 private val selectedTrackerType: LiveData<OrigamiTrackerType?> = liveSharedPreferencesRepository.getSelectedTrackerTypeAsLiveData()
121 .asFlow()
122 .map { origamiTrackerType ->
123 origamiTrackerType?.let {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/HistoryViewModel.kt:148:21Line detected, which is longer than the defined maximum line length in the code style.
145 editMedications(trackerItem, 0)
146 } else {
147 if (trackerItem.isLegacyItem) {
148 trackerRepository.deleteTracker(trackerItem.id, trackerItem.dateKey, trackerItem.type.toString(), null) {
149 sharedPreferencesRepository.removeDashboardLastUpdatedMoment() // so that once we return to the dashboard it would trigger an update
150 }
151 } else {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/HistoryViewModel.kt:149:25Line detected, which is longer than the defined maximum line length in the code style.
146 } else {
147 if (trackerItem.isLegacyItem) {
148 trackerRepository.deleteTracker(trackerItem.id, trackerItem.dateKey, trackerItem.type.toString(), null) {
149 sharedPreferencesRepository.removeDashboardLastUpdatedMoment() // so that once we return to the dashboard it would trigger an update
150 }
151 } else {
152 trackerRepository.deleteTrackerMs(trackerItem.id, trackerItem.extId, trackerItem.dateKey, trackerItem.type.toString(), null) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/HistoryViewModel.kt:152:21Line detected, which is longer than the defined maximum line length in the code style.
149 sharedPreferencesRepository.removeDashboardLastUpdatedMoment() // so that once we return to the dashboard it would trigger an update
150 }
151 } else {
152 trackerRepository.deleteTrackerMs(trackerItem.id, trackerItem.extId, trackerItem.dateKey, trackerItem.type.toString(), null) {
153 sharedPreferencesRepository.removeDashboardLastUpdatedMoment() // so that once we return to the dashboard it would trigger an update
154 }
155 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/HistoryViewModel.kt:153:25Line detected, which is longer than the defined maximum line length in the code style.
150 }
151 } else {
152 trackerRepository.deleteTrackerMs(trackerItem.id, trackerItem.extId, trackerItem.dateKey, trackerItem.type.toString(), null) {
153 sharedPreferencesRepository.removeDashboardLastUpdatedMoment() // so that once we return to the dashboard it would trigger an update
154 }
155 }
156 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/HistoryViewModel.kt:184:13Line detected, which is longer than the defined maximum line length in the code style.
181 if (trackerItem.type == OrigamiTrackerType.MEDICATION_GROUP) {
182 (trackerItem.measure as MedicationMeasure).dosage = intake.toDouble()
183 }
184 sharedPreferencesRepository.removeDashboardLastUpdatedMoment() // so that once we return to the dashboard it would trigger an update
185 _shouldShowProgressIndicator.value = false
186 }
187
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/HistoryViewModel.kt:215:5Line detected, which is longer than the defined maximum line length in the code style.
212 /**
213 * Combined structure of a multilevel history items with the tracker/dailytracker data injected
214 */
215 override val historyItems: LiveData<MutableList<HistoryCell>> = trackerItems.combineLatest(trackerDailies).asFlow().map { dataList ->
216 // a map of trackers where the dateKeys are the keys and the trackers of that date are the values
217 val trackers: Map<String, MutableList<TrackerItem>> =
218 dataList.first.associate { item -> item.dateKey.toTrackerDateString() to dataList.first.filter { it.dateKey == item.dateKey }.toMutableList() }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/HistoryViewModel.kt:218:13Line detected, which is longer than the defined maximum line length in the code style.
215 override val historyItems: LiveData<MutableList<HistoryCell>> = trackerItems.combineLatest(trackerDailies).asFlow().map { dataList ->
216 // a map of trackers where the dateKeys are the keys and the trackers of that date are the values
217 val trackers: Map<String, MutableList<TrackerItem>> =
218 dataList.first.associate { item -> item.dateKey.toTrackerDateString() to dataList.first.filter { it.dateKey == item.dateKey }.toMutableList() }
219 // a map of dailyTrackers where the dateKeys are the keys and dailyTrackers of that date are the values
220 val dailyTrackers: Map<String, TrackerDaily> = dataList.second.associateBy { it.dateKey.toTrackerDateString() }
221 val generatedList = historyGeneratedCells
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/HistoryViewModel.kt:222:9Line detected, which is longer than the defined maximum line length in the code style.
219 // a map of dailyTrackers where the dateKeys are the keys and dailyTrackers of that date are the values
220 val dailyTrackers: Map<String, TrackerDaily> = dataList.second.associateBy { it.dateKey.toTrackerDateString() }
221 val generatedList = historyGeneratedCells
222 // we want to perform an injection only if both trackers and dailyTrackers are of the same type and of the selected tracker type
223 val isDataConsistent = if (!trackers.isNullOrEmpty() && !dailyTrackers.isNullOrEmpty()) {
224 val trackerItemType = trackers.values.firstOrNull()?.firstOrNull()?.type
225 val trackerDailyType = dailyTrackers.values.firstOrNull()?.type
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/HistoryViewModel.kt:230:21Line detected, which is longer than the defined maximum line length in the code style.
227 ||
228 (trackerDailyType == null && trackerItemType == selectedTrackerType.value)
229 ||
230 (trackerItemType != null && trackerDailyType != null && trackerItemType == trackerDailyType && trackerItemType == selectedTrackerType.value)
231 } else {
232 true
233 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/HistoryViewModel.kt:275:13Line detected, which is longer than the defined maximum line length in the code style.
272 // we want to be sure that we refresh all editable days (sometimes that can be in the previous month)
273 val dateFrom = dateTo.minusDays(gdtConfiguration.getUpdatableDays())
274 if (origamiTrackerType != null) {
275 trackerConfigurationRepository.refreshConfigurationsForDateRangeIfNotSetOrNotExist(dateTo, dateFrom, origamiTrackerType)
276 }
277 }
278
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/HistoryViewModel.kt:288:5Line detected, which is longer than the defined maximum line length in the code style.
285 }
286 }
287
288 override fun provideSelectedTrackerTypeOrNull(): OrigamiTrackerType? = sharedPreferencesRepository.getSelectedTrackerTypeOrNull()
289
290 override fun provideUpdatableDays(): Int = gdtConfiguration.getUpdatableDays() ?: 0
291
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/HistoryViewModelFactory.kt:33:17Line detected, which is longer than the defined maximum line length in the code style.
30 override fun <T : ViewModel> create(modelClass: Class<T>): T {
31 return HistoryViewModelImpl(LiveSharedPreferencesRepositoryImpl(Origami.liveSharedPreferences!!),
32 OrigamiSharedPreferencesRepositoryImpl(Origami.sharedPreferences!!),
33 SubmissionSharedPreferencesRepositoryImpl(Origami.sharedPreferencesForSubmission!!, Origami.liveSharedPreferencesForSubmission!!),
34 TrackerHistoryRepositoryImpl(
35 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
36 Origami.getDatabaseInstance().trackerHistoryModel(),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/HistoryViewModelFactory.kt:35:25Line detected, which is longer than the defined maximum line length in the code style.
32 OrigamiSharedPreferencesRepositoryImpl(Origami.sharedPreferences!!),
33 SubmissionSharedPreferencesRepositoryImpl(Origami.sharedPreferencesForSubmission!!, Origami.liveSharedPreferencesForSubmission!!),
34 TrackerHistoryRepositoryImpl(
35 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
36 Origami.getDatabaseInstance().trackerHistoryModel(),
37 Origami.getDatabaseInstance().medicationNameModel(),
38 Origami.getDatabaseInstance().medicationConfigurationModel()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/HistoryViewModelFactory.kt:41:25Line detected, which is longer than the defined maximum line length in the code style.
38 Origami.getDatabaseInstance().medicationConfigurationModel()
39 ),
40 TrackerRepositoryImpl(
41 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
42 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
43 Origami.getDatabaseInstance().trackerModel(),
44 Origami.getDatabaseInstance().greenDayModel(),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/HistoryViewModelFactory.kt:42:25Line detected, which is longer than the defined maximum line length in the code style.
39 ),
40 TrackerRepositoryImpl(
41 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
42 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
43 Origami.getDatabaseInstance().trackerModel(),
44 Origami.getDatabaseInstance().greenDayModel(),
45 Origami.getDatabaseInstance().trackerHistoryModel()),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/HistoryViewModelFactory.kt:47:25Line detected, which is longer than the defined maximum line length in the code style.
44 Origami.getDatabaseInstance().greenDayModel(),
45 Origami.getDatabaseInstance().trackerHistoryModel()),
46 ConfigurationRepositoryImpl(
47 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
48 Origami.getDatabaseInstance().trackerConfigurationModel(),
49 OrigamiSharedPreferencesRepositoryImpl(Origami.sharedPreferences!!)
50 ),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/HistoryViewModelFactory.kt:52:17Line detected, which is longer than the defined maximum line length in the code style.
49 OrigamiSharedPreferencesRepositoryImpl(Origami.sharedPreferences!!)
50 ),
51 ConfigurationManager().getConfiguration().getMarket(),
52 ConfigurationManager().getConfiguration().getFeatureConfiguration(FeatureConfigurationType.GDT) as GDTConfiguration) as T
53 }
54 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/DescriptionProvider.kt:56:5Line detected, which is longer than the defined maximum line length in the code style.
53 */
54 object DescriptionProvider {
55
56 fun provideTitleForDay(resources: Resources, tracker: TrackerItem?, dailyTracker: TrackerDaily?, isSingleItem: Boolean) =
57 if (isSingleItem) {
58 if (tracker != null) {
59 provideTitleForSingleDay(resources, tracker, dailyTracker)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/DescriptionProvider.kt:67:5Line detected, which is longer than the defined maximum line length in the code style.
64 provideTitleForDay(resources, dailyTracker)
65 }
66
67 private fun provideTitleForSingleDay(resources: Resources, tracker: TrackerItem, dailyTracker: TrackerDaily?): String =
68 provideDescriptionContainer(
69 resources,
70 tracker.type,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/DescriptionProvider.kt:86:25Line detected, which is longer than the defined maximum line length in the code style.
83 when (dailyTracker.type) {
84 OrigamiTrackerType.DIET -> {
85 if (dailyTracker.measure is DietMeasureLegacy) {
86 val labelKeyQuality = LabelKey.fromMealQualityOrNull((dailyTracker.measure as DietMeasureLegacy).mealQuality)
87 DescriptionContainer(
88 labelKeyQuality?.stringResource
89 ?: R.string.no_entries_submitted_not_editable
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/DescriptionProvider.kt:91:21Line detected, which is longer than the defined maximum line length in the code style.
88 labelKeyQuality?.stringResource
89 ?: R.string.no_entries_submitted_not_editable
90 )
91 } else if (dailyTracker.measure is DietMeasure && dailyTracker.riskStratificationDisplay?.labelText != null) {
92 DescriptionContainer(dailyTracker.riskStratificationDisplay.labelText!!)
93 } else {
94 DescriptionContainer(R.string.no_entries_submitted_not_editable)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/DescriptionProvider.kt:99:25Line detected, which is longer than the defined maximum line length in the code style.
96 }
97 OrigamiTrackerType.MEDICATION_GROUP -> {
98 if (dailyTracker.measure is MedicationMeasure) {
99 val labelKeyQuality = LabelKey.fromMedicationLevel((dailyTracker.measure as MedicationMeasure).greenDayValue)
100 DescriptionContainer(labelKeyQuality.stringResource)
101 } else {
102 DescriptionContainer(R.string.detailed_tracker_type_name_medication_group_3)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/DescriptionProvider.kt:133:13Line detected, which is longer than the defined maximum line length in the code style.
130 // However we have some trackers that have different layout (for example Diet), that's why
131 // in those cases we have to have some custom logic
132 val descriptionContainer =
133 provideDescriptionContainer(resources, tracker.type, tracker.measure, tracker.version, false, trackerHistoryDisplay = tracker.display)
134 return descriptionContainer.provideDescription(resources).toString()
135 }
136
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/DescriptionProvider.kt:155:17Line detected, which is longer than the defined maximum line length in the code style.
152 val averages = mutableListOf<Double>()
153 when (trackerType) {
154 OrigamiTrackerType.ALCOHOL -> {
155 averages.add(dailyTrackers.filterIsInstance<AlcoholTrackerDaily>().map { it.measure.alcoholUse }.average())
156 }
157 OrigamiTrackerType.BLOOD_GLUCOSE -> {
158 averages.add(dailyTrackers.filterIsInstance<BloodGlucoseTrackerDaily>().map { it.measure.bloodGlucose.value }.average())
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/DescriptionProvider.kt:158:17Line detected, which is longer than the defined maximum line length in the code style.
155 averages.add(dailyTrackers.filterIsInstance<AlcoholTrackerDaily>().map { it.measure.alcoholUse }.average())
156 }
157 OrigamiTrackerType.BLOOD_GLUCOSE -> {
158 averages.add(dailyTrackers.filterIsInstance<BloodGlucoseTrackerDaily>().map { it.measure.bloodGlucose.value }.average())
159 }
160 OrigamiTrackerType.BLOOD_PRESSURE -> {
161 val bloodPressureTrackers = dailyTrackers.filterIsInstance<BloodPressureTrackerDaily>()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/DescriptionProvider.kt:166:17Line detected, which is longer than the defined maximum line length in the code style.
163 averages.add(bloodPressureTrackers.map { it.measure.diastolicBloodPressure.value }.average())
164 }
165 OrigamiTrackerType.CHOLESTEROL -> {
166 averages.add(dailyTrackers.filterIsInstance<CholesterolTrackerDaily>().map { it.measure.totalCholesterol.value }
167 .average())
168 }
169 OrigamiTrackerType.SLEEP -> {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/DescriptionProvider.kt:170:17Line detected, which is longer than the defined maximum line length in the code style.
167 .average())
168 }
169 OrigamiTrackerType.SLEEP -> {
170 averages.add(dailyTrackers.filterIsInstance<SleepTrackerDaily>().map { it.measure.sleepDuration.value }.average())
171 }
172 OrigamiTrackerType.SMOKE -> {
173 averages.add(dailyTrackers.filterIsInstance<SmokeTrackerDaily>().map { it.measure.smokeLevel }.average())
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/DescriptionProvider.kt:173:17Line detected, which is longer than the defined maximum line length in the code style.
170 averages.add(dailyTrackers.filterIsInstance<SleepTrackerDaily>().map { it.measure.sleepDuration.value }.average())
171 }
172 OrigamiTrackerType.SMOKE -> {
173 averages.add(dailyTrackers.filterIsInstance<SmokeTrackerDaily>().map { it.measure.smokeLevel }.average())
174 }
175 OrigamiTrackerType.STEPS -> {
176 averages.add(dailyTrackers.filterIsInstance<StepsTrackerDaily>().map { it.measure.stepCount }.average())
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/DescriptionProvider.kt:179:17Line detected, which is longer than the defined maximum line length in the code style.
176 averages.add(dailyTrackers.filterIsInstance<StepsTrackerDaily>().map { it.measure.stepCount }.average())
177 }
178 OrigamiTrackerType.WEIGHT -> {
179 averages.add(dailyTrackers.filterIsInstance<WeightTrackerDaily>().map { it.measure.bodyWeight.value }.average())
180 }
181 }
182 for (i in 0 until averages.size) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/DescriptionProvider.kt:191:9Line detected, which is longer than the defined maximum line length in the code style.
188 resources, trackerType, dailyTrackers.first().measure,
189 dailyTrackers.first().version, false, averages
190 )
191 return "${resources.getString(R.string.origami_history_average)} ${descriptionContainer.provideDescription(resources)}"
192 }
193
194 fun provideSubtitleForDay(resources: Resources, trackerDaily: TrackerDaily?, trackers: List<TrackerItem>): String {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/DescriptionProvider.kt:224:29Line detected, which is longer than the defined maximum line length in the code style.
221 if (source != Source.SourceType.USER) {
222 descriptionBuilder.append(" · ")
223 descriptionBuilder.append("${resources.getString(R.string.via)} ")
224 descriptionBuilder.append(resources.getString(tracker.channelType.provideStringResourceIfPossible()!!))
225 if (tracker.channelType != ChannelType.SHARECARE) {
226 descriptionBuilder.append(" on ")
227 descriptionBuilder.append(TrackerDateUtil.getHistoryExternalSourceSync(tracker.updatedDate))
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/DescriptionProvider.kt:227:33Line detected, which is longer than the defined maximum line length in the code style.
224 descriptionBuilder.append(resources.getString(tracker.channelType.provideStringResourceIfPossible()!!))
225 if (tracker.channelType != ChannelType.SHARECARE) {
226 descriptionBuilder.append(" on ")
227 descriptionBuilder.append(TrackerDateUtil.getHistoryExternalSourceSync(tracker.updatedDate))
228 }
229 } else {
230 descriptionBuilder.append(" · ")
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/DescriptionProvider.kt:231:29Line detected, which is longer than the defined maximum line length in the code style.
228 }
229 } else {
230 descriptionBuilder.append(" · ")
231 descriptionBuilder.append(resources.getString(tracker.channelType.provideStringResourceIfPossible()!!))
232 }
233 }
234 descriptionBuilder.toString()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/DescriptionProvider.kt:257:17Line detected, which is longer than the defined maximum line length in the code style.
254 } else {
255 descriptionBuilder.append(resources.getString(R.string.origami_manual_source))
256 }
257 descriptionBuilder.append(" ${resources.getString(R.string.origami_source_date_prefix)} ${TrackerDateUtil.getHistoryExternalSourceSync(tracker.updatedDate)}")
258 descriptionBuilder.toString()
259 }
260
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/DescriptionProvider.kt:268:17Line detected, which is longer than the defined maximum line length in the code style.
265 OrigamiTrackerType.STEPS,
266 OrigamiTrackerType.WEIGHT -> {
267 val descriptionBuilder = StringBuilder()
268 if (tracker.channelType.provideStringResourceIfPossible() != null && tracker.channelType != ChannelType.MANUAL) {
269 descriptionBuilder.append("${resources.getString(R.string.via)} ")
270 descriptionBuilder.append(resources.getString(tracker.channelType.provideStringResourceIfPossible()!!))
271 } else {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/DescriptionProvider.kt:270:21Line detected, which is longer than the defined maximum line length in the code style.
267 val descriptionBuilder = StringBuilder()
268 if (tracker.channelType.provideStringResourceIfPossible() != null && tracker.channelType != ChannelType.MANUAL) {
269 descriptionBuilder.append("${resources.getString(R.string.via)} ")
270 descriptionBuilder.append(resources.getString(tracker.channelType.provideStringResourceIfPossible()!!))
271 } else {
272 descriptionBuilder.append(resources.getString(R.string.origami_manual_source))
273 descriptionBuilder.append(" ${resources.getString(R.string.origami_source_date_prefix)} ${TrackerDateUtil.getHistoryExternalSourceSync(tracker.updatedDate)}")
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/DescriptionProvider.kt:273:21Line detected, which is longer than the defined maximum line length in the code style.
270 descriptionBuilder.append(resources.getString(tracker.channelType.provideStringResourceIfPossible()!!))
271 } else {
272 descriptionBuilder.append(resources.getString(R.string.origami_manual_source))
273 descriptionBuilder.append(" ${resources.getString(R.string.origami_source_date_prefix)} ${TrackerDateUtil.getHistoryExternalSourceSync(tracker.updatedDate)}")
274 }
275 descriptionBuilder.toString()
276
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/DescriptionProvider.kt:292:21Line detected, which is longer than the defined maximum line length in the code style.
289 val descriptionBuilder = StringBuilder()
290 if (source == Source.SourceType.FT_VOICE_ANALYZER) {
291 descriptionBuilder.append(resources.getString(R.string.origami_voice_source))
292 descriptionBuilder.append(" ${resources.getString(R.string.origami_source_date_prefix)} ${TrackerDateUtil.getHistoryExternalSourceSync(tracker.updatedDate)}")
293 } else {
294 descriptionBuilder.append(resources.getString(R.string.origami_manual_source))
295 descriptionBuilder.append(" ${resources.getString(R.string.origami_source_date_prefix)} ${TrackerDateUtil.getHistoryExternalSourceSync(tracker.updatedDate)}")
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/DescriptionProvider.kt:295:21Line detected, which is longer than the defined maximum line length in the code style.
292 descriptionBuilder.append(" ${resources.getString(R.string.origami_source_date_prefix)} ${TrackerDateUtil.getHistoryExternalSourceSync(tracker.updatedDate)}")
293 } else {
294 descriptionBuilder.append(resources.getString(R.string.origami_manual_source))
295 descriptionBuilder.append(" ${resources.getString(R.string.origami_source_date_prefix)} ${TrackerDateUtil.getHistoryExternalSourceSync(tracker.updatedDate)}")
296 }
297 descriptionBuilder.toString()
298 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/DescriptionProvider.kt:319:17Line detected, which is longer than the defined maximum line length in the code style.
316 OrigamiTrackerType.BLOOD_PRESSURE -> measure is BloodPressureMeasure
317 OrigamiTrackerType.CHOLESTEROL -> measure is CholesterolMeasure
318 OrigamiTrackerType.DIET ->
319 (measure is DietMeasure && measure.isValidFromManual() && LabelKey.fromDietLevelOrNull(measure.dietLevel!!) != null)
320 || (measure is DietMeasure && measure.isValidFromCamera())
321 || (measure is DietMeasureLegacy && MealSize.fromMealQuantityOrNull(measure.mealQuantity) != null &&
322 LabelKey.fromMealQualityOrNull(measure.mealQuality) != null)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/DescriptionProvider.kt:321:25Line detected, which is longer than the defined maximum line length in the code style.
318 OrigamiTrackerType.DIET ->
319 (measure is DietMeasure && measure.isValidFromManual() && LabelKey.fromDietLevelOrNull(measure.dietLevel!!) != null)
320 || (measure is DietMeasure && measure.isValidFromCamera())
321 || (measure is DietMeasureLegacy && MealSize.fromMealQuantityOrNull(measure.mealQuantity) != null &&
322 LabelKey.fromMealQualityOrNull(measure.mealQuality) != null)
323 OrigamiTrackerType.FITNESS -> measure is FitnessMeasure &&
324 LabelKey.fromFitnessLevelOrNull(measure.fitnessLevel) != null
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/DescriptionProvider.kt:396:34Line detected, which is longer than the defined maximum line length in the code style.
393 val mealType = MealType.getByName(measure.mealType)
394 if (labelKeyQuality != null && labelKeyQuantity != null && mealType != null) {
395 DescriptionContainer(
396 "${resources.getString(labelKeyQuality.stringResource)} ${resources.getString(labelKeyQuantity.stringResource)} ${
397 resources.getString(mealType.stringRes)
398 }"
399 )
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/DescriptionProvider.kt:407:37Line detected, which is longer than the defined maximum line length in the code style.
404 when {
405 measure.isValidFromManual() -> {
406 val labelKey =
407 if (trackerHistoryDisplay?.labelKey != null && LabelKey.fromString(trackerHistoryDisplay.labelKey, null) != LabelKey.EMPTY) {
408 LabelKey.fromString(trackerHistoryDisplay.labelKey, null)
409 } else {
410 LabelKey.fromDietLevelOrNull(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/DescriptionProvider.kt:441:21Line detected, which is longer than the defined maximum line length in the code style.
438 OrigamiTrackerType.MEDICATION_GROUP ->
439 DescriptionContainer((measure as MedicationMeasure).medicationName ?: "")
440 OrigamiTrackerType.RELATIONSHIP -> {
441 val labelKey = LabelKey.fromRelationshipLevel((measure as RelationshipMeasure).relationship, greenDayTrackerVersion)
442 DescriptionContainer(
443 labelKey?.stringResource
444 ?: R.string.no_entries_submitted_not_editable
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/DescriptionProvider.kt:489:29Line detected, which is longer than the defined maximum line length in the code style.
486 DescriptionContainer(labelKey!!.stringResource)
487 } else if (measure is StressMeasure) {
488 val labelKey =
489 if (trackerHistoryDisplay?.labelKey != null && LabelKey.fromString(trackerHistoryDisplay.labelKey, null) != LabelKey.EMPTY) {
490 LabelKey.fromString(trackerHistoryDisplay.labelKey, null)
491 } else {
492 LabelKey.fromStressLevel(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/DescriptionProvider.kt:517:17Line detected, which is longer than the defined maximum line length in the code style.
514 }
515 } else if (isDailyTrackerNull) {
516 if (trackerType == OrigamiTrackerType.MEDICATION_GROUP) {
517 DescriptionContainer(if (greenDayValue == 0) R.string.detailed_tracker_type_name_medication_group_3 else R.string.no_entries_submitted_not_editable)
518 }
519 DescriptionContainer(R.string.no_entries_submitted_not_editable)
520 } else {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/HistoryCell.kt:198:21Line detected, which is longer than the defined maximum line length in the code style.
195 if (child is DayCell) {
196 with(realChildren) {
197 val indexToInsertTo =
198 filterIsInstance<DayCell>().filter { it.dailyTracker?.id != null }.indexOfFirst { it.dailyTracker?.id == child.dailyTracker?.id }
199
200 if (indexToInsertTo == -1) {
201 super.addToTop(child)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/HistoryCell.kt:249:1Line detected, which is longer than the defined maximum line length in the code style.
246 * A history cell that represents a day
247 * Holds a single daily tracker
248 */
249 class DayCell(dateTimeStart: DateTime?, level: Int, var dailyTracker: TrackerDaily?) : HistoryCell(dateTimeStart, level) {
250 override var expandedState: MultilevelState? = MultilevelState.SOLID_COLLAPSED
251
252 /**
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/HistoryCell.kt:253:6Line detected, which is longer than the defined maximum line length in the code style.
250 override var expandedState: MultilevelState? = MultilevelState.SOLID_COLLAPSED
251
252 /**
253 * Adds trackers of a given date to the day cell. Removes older moments if they are no longer present in the trackers list
254 */
255 fun updateCellsWithData(dateTime: DateTime?, trackers: List<TrackerItem>) {
256 // We need to find all moment cells that contain tracker items which are no longer present in the trackers list
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/HistoryCell.kt:264:9Line detected, which is longer than the defined maximum line length in the code style.
261 .forEach {
262 removeById(it)
263 }
264 // We create moment cells for each tracker from the trackers list and then call addToTop method for each of the items
265 trackers.map{
266 MomentCell(dateTime, level + 1, it).apply {
267 this.indent = this@DayCell.indent + 1
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/HistoryCell.kt:290:21Line detected, which is longer than the defined maximum line length in the code style.
287 clear()
288 }
289
290 val indexToInsertTo = filterIsInstance<MomentCell>().indexOfFirst { it.trackerItem.id == child.trackerItem.id }
291
292 if (indexToInsertTo == -1) {
293 super.addToTop(child)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/HistoryCell.kt:300:25Line detected, which is longer than the defined maximum line length in the code style.
297 if (child.trackerItem.measure is MedicationMeasure) {
298 //Todo: need to find best way to sort, sorting on every add will impact performance
299 sortBy { ((it as MomentCell).trackerItem.measure as MedicationMeasure).medicationName }
300 sortByDescending { with((it as MomentCell).trackerItem.measure as MedicationMeasure) { dosage < medicationDosage } }
301 } else
302 sortByDescending { (it as MomentCell).dateTimeStart }
303 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/HistoryCell.kt:314:13Line detected, which is longer than the defined maximum line length in the code style.
311 */
312 override fun provideTitle(resources: Resources): String =
313 DescriptionProvider
314 .provideTitleForDay(resources, provideChildrenForUi().filterIsInstance<MomentCell>().map { it.trackerItem }.firstOrNull(), dailyTracker, isSingleItem())
315
316 /**
317 * Provides a subtitle for a day
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/HistoryCell.kt:325:9Line detected, which is longer than the defined maximum line length in the code style.
322 provideChildrenForUi().filterIsInstance<MomentCell>().map { it.trackerItem })
323
324 private fun isSingleItem(): Boolean =
325 expandedState == MultilevelState.SOLID_COLLAPSED && this.provideChildrenForUi().size == 1 && !isDietWithCameraData() && !isStressWithVoiceData()
326
327 override fun provideDateKeyToCreateOrNull(): DateTime? {
328 val trackerItem = provideChildrenForUi().filterIsInstance<MomentCell>().map { it.trackerItem }.firstOrNull()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/HistoryCell.kt:340:13Line detected, which is longer than the defined maximum line length in the code style.
337 val trackerItem = provideChildrenForUi().filterIsInstance<MomentCell>().map { it.trackerItem }.firstOrNull()
338
339 return trackerItem?.let { item ->
340 if (isSingleItem() && item.isEditable() && !isMedication() && !isDietWithCameraData() && !isStressWithVoiceData()) {
341 item
342 } else {
343 null
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/HistoryCell.kt:361:9Line detected, which is longer than the defined maximum line length in the code style.
358 * Helper method to check that the tracker item belongs to medication
359 */
360 fun isMedication(): Boolean {
361 val type = this.dailyTracker?.type ?: provideChildrenForUi().filterIsInstance<MomentCell>().map { it.trackerItem }.firstOrNull()?.type
362 val measure = this.dailyTracker?.measure ?: provideChildrenForUi().filterIsInstance<MomentCell>().map { it.trackerItem }.firstOrNull()?.measure
363 return (type != null && type == OrigamiTrackerType.MEDICATION_GROUP) || (measure != null && measure is MedicationMeasure)
364 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/HistoryCell.kt:362:9Line detected, which is longer than the defined maximum line length in the code style.
359 */
360 fun isMedication(): Boolean {
361 val type = this.dailyTracker?.type ?: provideChildrenForUi().filterIsInstance<MomentCell>().map { it.trackerItem }.firstOrNull()?.type
362 val measure = this.dailyTracker?.measure ?: provideChildrenForUi().filterIsInstance<MomentCell>().map { it.trackerItem }.firstOrNull()?.measure
363 return (type != null && type == OrigamiTrackerType.MEDICATION_GROUP) || (measure != null && measure is MedicationMeasure)
364 }
365
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/HistoryCell.kt:363:9Line detected, which is longer than the defined maximum line length in the code style.
360 fun isMedication(): Boolean {
361 val type = this.dailyTracker?.type ?: provideChildrenForUi().filterIsInstance<MomentCell>().map { it.trackerItem }.firstOrNull()?.type
362 val measure = this.dailyTracker?.measure ?: provideChildrenForUi().filterIsInstance<MomentCell>().map { it.trackerItem }.firstOrNull()?.measure
363 return (type != null && type == OrigamiTrackerType.MEDICATION_GROUP) || (measure != null && measure is MedicationMeasure)
364 }
365
366 fun isDietWithCameraData(): Boolean {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/HistoryCell.kt:383:1Line detected, which is longer than the defined maximum line length in the code style.
380 * A history cell that represents a moment
381 * Holds a single tracker item
382 */
383 class MomentCell(dateTimeStart: DateTime?, level: Int, val trackerItem: TrackerItem) : HistoryCell(dateTimeStart, level) {
384 override fun provideTitle(resources: Resources): String = DescriptionProvider.provideTitleForMoment(resources, trackerItem)
385
386 override fun provideSubtitle(resources: Resources): String = DescriptionProvider.provideSubtitleForMoment(resources, trackerItem)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/HistoryCell.kt:384:5Line detected, which is longer than the defined maximum line length in the code style.
381 * Holds a single tracker item
382 */
383 class MomentCell(dateTimeStart: DateTime?, level: Int, val trackerItem: TrackerItem) : HistoryCell(dateTimeStart, level) {
384 override fun provideTitle(resources: Resources): String = DescriptionProvider.provideTitleForMoment(resources, trackerItem)
385
386 override fun provideSubtitle(resources: Resources): String = DescriptionProvider.provideSubtitleForMoment(resources, trackerItem)
387
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/HistoryCell.kt:386:5Line detected, which is longer than the defined maximum line length in the code style.
383 class MomentCell(dateTimeStart: DateTime?, level: Int, val trackerItem: TrackerItem) : HistoryCell(dateTimeStart, level) {
384 override fun provideTitle(resources: Resources): String = DescriptionProvider.provideTitleForMoment(resources, trackerItem)
385
386 override fun provideSubtitle(resources: Resources): String = DescriptionProvider.provideSubtitleForMoment(resources, trackerItem)
387
388 override fun provideDateKeyToCreateOrNull(): DateTime? = if (trackerItem.isCreatable()) {
389 trackerItem.dateKey
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/HistoryCell.kt:401:9Line detected, which is longer than the defined maximum line length in the code style.
398 }
399
400 override fun provideTrackerItemToDeleteOrNull(): TrackerItem? =
401 if (trackerItem.isDeletable() && (trackerItem.measure !is MedicationMeasure || (trackerItem.measure as MedicationMeasure).dosage != 0.0)) {
402 trackerItem
403 } else {
404 null
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/HistoryCellsGenerator.kt:12:2Line detected, which is longer than the defined maximum line length in the code style.
9 import org.joda.time.DateTime
10
11 /**
12 * Generates the multilevel list consisting of weeks, months and years needed for the history list on the DetailsFragment
13 */
14 object HistoryCellsGenerator {
15 fun generate(minDateTime: DateTime, market: Market): List<HistoryCell> {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/HistoryCellsGenerator.kt:111:17Line detected, which is longer than the defined maximum line length in the code style.
108 }
109
110 // any month (except the current month of the current year) is added to the year item
111 // the current month of the current year is not needed here because we show it as weeks in the root level (see above)
112 if (!isCurrentMonth(maxDateTime, month) || !isCurrentYear(maxDateTime, year)) {
113 yearItem.addToTop(monthItem)
114 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/HistoryCellsGenerator.kt:133:13Line detected, which is longer than the defined maximum line length in the code style.
130 // "2020"
131 // "2019"
132 // "2018"
133 val indexToInsertTo = if (isCurrentYear(maxDateTime, year) && historyItems.filterIsInstance<WeekCell>().isNotEmpty()) {
134 // current year should go below "this week" and "last week"
135 historyItems.lastIndexOf(historyItems.filterIsInstance<WeekCell>().last()) + 1
136 } else {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/HistoryCellsGenerator.kt:181:13Line detected, which is longer than the defined maximum line length in the code style.
178 }
179
180 private fun isFirstDayOfWeek(currentDateTime: DateTime, minDay: Int, market: Market) =
181 currentDateTime.dayOfMonth == minDay || currentDateTime.dayOfWeek == DateRangeHelper.getFirstDayOfWeek(market)
182
183 private fun isLastDayOfWeek(currentDateTime: DateTime, maxDay: Int, market: Market) =
184 currentDateTime.dayOfMonth == maxDay || currentDateTime.dayOfWeek == DateRangeHelper.getLastDayOfWeek(market)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/HistoryCellsGenerator.kt:184:13Line detected, which is longer than the defined maximum line length in the code style.
181 currentDateTime.dayOfMonth == minDay || currentDateTime.dayOfWeek == DateRangeHelper.getFirstDayOfWeek(market)
182
183 private fun isLastDayOfWeek(currentDateTime: DateTime, maxDay: Int, market: Market) =
184 currentDateTime.dayOfMonth == maxDay || currentDateTime.dayOfWeek == DateRangeHelper.getLastDayOfWeek(market)
185
186 private fun isCurrentYear(maxDateTime: DateTime, year: Int) = year == maxDateTime.year
187
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/HistoryitemInjector.kt:39:9Line detected, which is longer than the defined maximum line length in the code style.
36 // the design requires us to show placeholders for the days that are still editable but
37 // a user has not yet added anything to those
38 // for this purpose we generate so-called dummy trackers (see DummyTrackerItem) for such empty days
39 // and then we add those dummy trackers to the trackers array so that they will be injected into the historyCells
40 val today = DateTime.now().withTimeAtStartOfDay()
41 val interval = Interval(today.minusDays(updatableDays), today)
42 val keys = interval.toDateTimes(TimeUnit.DAY).toList()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/HistoryitemInjector.kt:45:13Line detected, which is longer than the defined maximum line length in the code style.
42 val keys = interval.toDateTimes(TimeUnit.DAY).toList()
43 // Iterating through all dates that are updatable
44 for (key in keys) {
45 // if the trackers map has nothing for that particular date – we add the date as a key and assign an empty list of trackers
46 if (!trackersMap.containsKey(key.toTrackerDateString())) {
47 trackersMap[key.toTrackerDateString()] = mutableListOf()
48 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/HistoryitemInjector.kt:49:13Line detected, which is longer than the defined maximum line length in the code style.
46 if (!trackersMap.containsKey(key.toTrackerDateString())) {
47 trackersMap[key.toTrackerDateString()] = mutableListOf()
48 }
49 // if the trackers map has the date key but only an empty list of trackers assigned to it, then we need to put a dummyTracker there
50 if (trackersMap[key.toTrackerDateString()]!!.isEmpty() && !dailyTrackersMap.containsKey(key.toTrackerDateString())) {
51 val isEditable = key.isInEditableRange(updatableDays)
52 val dummyTrackerItem = DummyTrackerItem(trackerType, key, isEditable, false)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/HistoryitemInjector.kt:50:13Line detected, which is longer than the defined maximum line length in the code style.
47 trackersMap[key.toTrackerDateString()] = mutableListOf()
48 }
49 // if the trackers map has the date key but only an empty list of trackers assigned to it, then we need to put a dummyTracker there
50 if (trackersMap[key.toTrackerDateString()]!!.isEmpty() && !dailyTrackersMap.containsKey(key.toTrackerDateString())) {
51 val isEditable = key.isInEditableRange(updatableDays)
52 val dummyTrackerItem = DummyTrackerItem(trackerType, key, isEditable, false)
53 trackersMap[key.toTrackerDateString()]!!.add(dummyTrackerItem)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/HistoryitemInjector.kt:57:9Line detected, which is longer than the defined maximum line length in the code style.
54 }
55 }
56
57 // we have to iterate through both: trackers' dateKeys and and daily trackers' dateKeys, so we'll merge them together
58 val dateKeys: List<String> = (dailyTrackersMap.keys.toList() + trackersMap.keys.toList()).distinct()
59
60 for (dateKey in dateKeys) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/HistoryitemInjector.kt:82:5Line detected, which is longer than the defined maximum line length in the code style.
79 return historyCells
80 }
81
82 private fun injectItem(item: HistoryCell, dateTime: DateTime, trackerDaily: TrackerDaily?, trackers: List<TrackerItem>) {
83 if (item is YearCell && item.dateTimeStart?.year != dateTime.year ||
84 item is MonthCell && item.dateTimeStart?.monthOfYear != dateTime.monthOfYear
85 ) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/HistoryitemInjector.kt:101:5Line detected, which is longer than the defined maximum line length in the code style.
98 }
99 }
100
101 private fun insertDay(item: WeekCell, dateTime: DateTime, trackerDaily: TrackerDaily?, trackers: List<TrackerItem>) {
102 // we inject the day only if it belongs to the current week
103 if (HistoryCellsGenerator.isCurrentWeek(item.dateTimeStart, item.dateTimeEnd, dateTime)) {
104 // a day may already exist in case there are two or more trackers for that day
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/model/HistoryitemInjector.kt:126:25Line detected, which is longer than the defined maximum line length in the code style.
123 // then by design it should never be expanded (aka SOLID_COLLAPSED)
124 // otherwise we keep the state
125 dayItem.apply {
126 expandedState = if (this.provideChildrenForUi().size == 1 && !isDietWithCameraData() && !isStressWithVoiceData()) {
127 MultilevelState.SOLID_COLLAPSED
128 } else if (expandedState == MultilevelState.SOLID_COLLAPSED) {
129 MultilevelState.COLLAPSED
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/view/DefaultItemAnimator.kt:17:5Line detected, which is longer than the defined maximum line length in the code style.
14 private val pendingAdditions: ArrayList<RecyclerView.ViewHolder> = ArrayList<RecyclerView.ViewHolder>()
15 private val pendingMoves: ArrayList<MoveInfo> = ArrayList()
16 private val pendingChanges: ArrayList<ChangeInfo> = ArrayList()
17 private val additionsList: ArrayList<ArrayList<RecyclerView.ViewHolder>> = ArrayList<ArrayList<RecyclerView.ViewHolder>>()
18 private val movesList: ArrayList<ArrayList<MoveInfo>> = ArrayList()
19 private val changesList: ArrayList<ArrayList<ChangeInfo>> = ArrayList()
20 private val addAnimations: ArrayList<RecyclerView.ViewHolder?> = ArrayList<RecyclerView.ViewHolder?>()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/view/DefaultItemAnimator.kt:25:5Line detected, which is longer than the defined maximum line length in the code style.
22 private val removeAnimations: ArrayList<RecyclerView.ViewHolder?> = ArrayList<RecyclerView.ViewHolder?>()
23 private val changeAnimations: ArrayList<RecyclerView.ViewHolder?> = ArrayList<RecyclerView.ViewHolder?>()
24
25 private class MoveInfo internal constructor(holder: RecyclerView.ViewHolder, fromX: Int, fromY: Int, toX: Int, toY: Int) {
26 var holder: RecyclerView.ViewHolder = holder
27 var fromX: Int = fromX
28 var fromY: Int = fromY
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/view/DefaultItemAnimator.kt:34:5Line detected, which is longer than the defined maximum line length in the code style.
31
32 }
33
34 private class ChangeInfo private constructor(oldHolder: RecyclerView.ViewHolder, newHolder: RecyclerView.ViewHolder?) {
35 var oldHolder: RecyclerView.ViewHolder? = oldHolder
36 var newHolder: RecyclerView.ViewHolder? = newHolder
37 var fromX: Int = 0
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/view/DefaultItemAnimator.kt:320:13Line detected, which is longer than the defined maximum line length in the code style.
317 if (newView != null) {
318 val newViewAnimation: ViewPropertyAnimatorCompat = ViewCompat.animate(newView)
319 changeAnimations.add(changeInfo.newHolder)
320 newViewAnimation.translationX(0f).translationY(0f).setDuration(getChangeDuration()).alpha(1f).setListener(object : ViewPropertyAnimatorListener {
321 override fun onAnimationStart(view: View?) {
322 dispatchChangeStarting(changeInfo.newHolder, false)
323 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/view/RecyclerItemTouchHelper.kt:12:1Line detected, which is longer than the defined maximum line length in the code style.
9 fun onSwiped(viewHolder: RecyclerView.ViewHolder?, direction: Int, position: Int)
10 }
11
12 class RecyclerItemTouchHelper(dragDirs: Int, swipeDirs: Int, private val listener: RecyclerItemTouchHelperListener) : ItemTouchHelper.SimpleCallback(dragDirs, swipeDirs) {
13 override fun onMove(recyclerView: RecyclerView, viewHolder: RecyclerView.ViewHolder, target: RecyclerView.ViewHolder): Boolean {
14 return true
15 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/view/RecyclerItemTouchHelper.kt:13:5Line detected, which is longer than the defined maximum line length in the code style.
10 }
11
12 class RecyclerItemTouchHelper(dragDirs: Int, swipeDirs: Int, private val listener: RecyclerItemTouchHelperListener) : ItemTouchHelper.SimpleCallback(dragDirs, swipeDirs) {
13 override fun onMove(recyclerView: RecyclerView, viewHolder: RecyclerView.ViewHolder, target: RecyclerView.ViewHolder): Boolean {
14 return true
15 }
16
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/view/RecyclerItemTouchHelper.kt:23:5Line detected, which is longer than the defined maximum line length in the code style.
20 }
21 }
22
23 override fun onChildDrawOver(c: Canvas, recyclerView: RecyclerView, viewHolder: RecyclerView.ViewHolder?, dX: Float, dY: Float, actionState: Int, isCurrentlyActive: Boolean) {
24 if (viewHolder != null && viewHolder is HistoryAdapter.Holder) {
25 getDefaultUIUtil().onDrawOver(c, recyclerView, viewHolder.getForegroundView(), dX, dY,
26 actionState, isCurrentlyActive)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/view/RecyclerItemTouchHelper.kt:36:5Line detected, which is longer than the defined maximum line length in the code style.
33 }
34 }
35
36 override fun onChildDraw(c: Canvas, recyclerView: RecyclerView, viewHolder: RecyclerView.ViewHolder, dX: Float, dY: Float, actionState: Int, isCurrentlyActive: Boolean) {
37 if (viewHolder is HistoryAdapter.Holder && viewHolder.adapterPosition > 0 && recyclerView.adapter is HistoryAdapter
38 && (recyclerView.adapter as HistoryAdapter).items.size > viewHolder.adapterPosition
39 && (recyclerView.adapter as HistoryAdapter).items.get(viewHolder.adapterPosition).provideTrackerItemToDeleteOrNull() != null) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/view/RecyclerItemTouchHelper.kt:37:9Line detected, which is longer than the defined maximum line length in the code style.
34 }
35
36 override fun onChildDraw(c: Canvas, recyclerView: RecyclerView, viewHolder: RecyclerView.ViewHolder, dX: Float, dY: Float, actionState: Int, isCurrentlyActive: Boolean) {
37 if (viewHolder is HistoryAdapter.Holder && viewHolder.adapterPosition > 0 && recyclerView.adapter is HistoryAdapter
38 && (recyclerView.adapter as HistoryAdapter).items.size > viewHolder.adapterPosition
39 && (recyclerView.adapter as HistoryAdapter).items.get(viewHolder.adapterPosition).provideTrackerItemToDeleteOrNull() != null) {
40 getDefaultUIUtil().onDraw(c, recyclerView, viewHolder.getForegroundView(), dX, dY,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/history/view/RecyclerItemTouchHelper.kt:39:17Line detected, which is longer than the defined maximum line length in the code style.
36 override fun onChildDraw(c: Canvas, recyclerView: RecyclerView, viewHolder: RecyclerView.ViewHolder, dX: Float, dY: Float, actionState: Int, isCurrentlyActive: Boolean) {
37 if (viewHolder is HistoryAdapter.Holder && viewHolder.adapterPosition > 0 && recyclerView.adapter is HistoryAdapter
38 && (recyclerView.adapter as HistoryAdapter).items.size > viewHolder.adapterPosition
39 && (recyclerView.adapter as HistoryAdapter).items.get(viewHolder.adapterPosition).provideTrackerItemToDeleteOrNull() != null) {
40 getDefaultUIUtil().onDraw(c, recyclerView, viewHolder.getForegroundView(), dX, dY,
41 actionState, isCurrentlyActive)
42 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/info/InfoBlockViewViewModel.kt:79:13Line detected, which is longer than the defined maximum line length in the code style.
76 OrigamiTrackerType.BLOOD_GLUCOSE ->
77 trackerConfigurationRepository.getConfiguration(DateTime.now()).map { it?.diabetic == false &&
78 infoPageType == InfoPageType.DETAILS}
79 OrigamiTrackerType.SLEEP -> liveSharedPreferencesRepository.isSleepAutoTrackedAsLiveData().map { it == false }
80 OrigamiTrackerType.SMOKE ->
81 trackerConfigurationRepository.getConfiguration(DateTime.now()).map { it?.nonSmoker == true &&
82 infoPageType == InfoPageType.DETAILS}
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/info/InfoBlockViewViewModel.kt:83:13Line detected, which is longer than the defined maximum line length in the code style.
80 OrigamiTrackerType.SMOKE ->
81 trackerConfigurationRepository.getConfiguration(DateTime.now()).map { it?.nonSmoker == true &&
82 infoPageType == InfoPageType.DETAILS}
83 OrigamiTrackerType.STEPS -> liveSharedPreferencesRepository.isStepsAutoTrackedAsLiveData().map { it == false }
84 OrigamiTrackerType.MEDICATION_GROUP ->
85 trackerConfigurationRepository.getConfiguration(DateTime.now()).map { it?.medicationSettingList.isNullOrEmpty() &&
86 infoPageType == InfoPageType.DETAILS}
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/info/InfoBlockViewViewModel.kt:85:17Line detected, which is longer than the defined maximum line length in the code style.
82 infoPageType == InfoPageType.DETAILS}
83 OrigamiTrackerType.STEPS -> liveSharedPreferencesRepository.isStepsAutoTrackedAsLiveData().map { it == false }
84 OrigamiTrackerType.MEDICATION_GROUP ->
85 trackerConfigurationRepository.getConfiguration(DateTime.now()).map { it?.medicationSettingList.isNullOrEmpty() &&
86 infoPageType == InfoPageType.DETAILS}
87 else -> MutableLiveData<Boolean>().apply { postValue(false) } // all other trackers are neither auto tracked nor conditional
88 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/info/InfoBlockViewViewModel.kt:87:13Line detected, which is longer than the defined maximum line length in the code style.
84 OrigamiTrackerType.MEDICATION_GROUP ->
85 trackerConfigurationRepository.getConfiguration(DateTime.now()).map { it?.medicationSettingList.isNullOrEmpty() &&
86 infoPageType == InfoPageType.DETAILS}
87 else -> MutableLiveData<Boolean>().apply { postValue(false) } // all other trackers are neither auto tracked nor conditional
88 }
89 }
90
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/info/InfoBlockViewViewModel.kt:95:5Line detected, which is longer than the defined maximum line length in the code style.
92 it && origamiTrackerType.value != OrigamiTrackerType.MEDICATION_GROUP
93 }
94
95 override val infoHintContainer: LiveData<InfoBlockHintContainer> = origamiTrackerType.combineLatest(_isActionButtonShown).map { pair ->
96 val trackerType = pair.first
97 val parameter = pair.second
98 when (trackerType) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/info/InfoBlockViewViewModelFactory.kt:22:25Line detected, which is longer than the defined maximum line length in the code style.
19 return InfoBlockViewViewModelImpl(LiveSharedPreferencesRepositoryImpl(Origami.liveSharedPreferences!!),
20 OrigamiSharedPreferencesRepositoryImpl(Origami.sharedPreferences!!),
21 ConfigurationRepositoryImpl(
22 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
23 Origami.getDatabaseInstance().trackerConfigurationModel(),
24 OrigamiSharedPreferencesRepositoryImpl(Origami.sharedPreferences!!)
25 )) as T
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/info/InfoBlockViewViewModelFactory.kt:38:5Line detected, which is longer than the defined maximum line length in the code style.
35 * Use this approach instead of creating the ViewModels directly inside the views
36 */
37 class InfoBlockViewViewModelInjector : InfoBlockViewViewModelAccessor {
38 override var viewModel: InfoBlockViewViewModel = InfoBlockViewViewModelFactory().create(InfoBlockViewViewModelImpl::class.java)
39 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/info/model/InfoBlockHintContainer.kt:57:17Line detected, which is longer than the defined maximum line length in the code style.
54 if (isConditionTurnedOff) {
55 when (trackerType) {
56 OrigamiTrackerType.ALCOHOL -> resources.getString(R.string.origami_info_configuration_off_alcohol)
57 OrigamiTrackerType.BLOOD_GLUCOSE -> resources.getString(R.string.origami_info_configuration_off_blood_glucose)
58 OrigamiTrackerType.SMOKE -> resources.getString(R.string.origami_info_configuration_off_smoke)
59 OrigamiTrackerType.MEDICATION_GROUP -> resources.getString(R.string.origami_info_configuration_off_medication)
60 else -> ""
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/info/model/InfoBlockHintContainer.kt:59:17Line detected, which is longer than the defined maximum line length in the code style.
56 OrigamiTrackerType.ALCOHOL -> resources.getString(R.string.origami_info_configuration_off_alcohol)
57 OrigamiTrackerType.BLOOD_GLUCOSE -> resources.getString(R.string.origami_info_configuration_off_blood_glucose)
58 OrigamiTrackerType.SMOKE -> resources.getString(R.string.origami_info_configuration_off_smoke)
59 OrigamiTrackerType.MEDICATION_GROUP -> resources.getString(R.string.origami_info_configuration_off_medication)
60 else -> ""
61 }
62 } else {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/model/DetailsUiConfiguration.kt:38:9Line detected, which is longer than the defined maximum line length in the code style.
35
36
37 companion object {
38 fun fromOrigamiTrackerType(origamiTrackerType: OrigamiTrackerType, shouldShowUpdateLabel: Boolean) = when (origamiTrackerType) {
39 OrigamiTrackerType.ALCOHOL -> fromAlcohol()
40 OrigamiTrackerType.BLOOD_GLUCOSE -> fromBloodGlucose()
41 OrigamiTrackerType.BLOOD_PRESSURE -> fromBloodPressure()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/model/DetailsUiConfiguration.kt:54:17Line detected, which is longer than the defined maximum line length in the code style.
51 OrigamiTrackerType.WEIGHT -> fromWeight()
52 }.apply {
53 this.primaryButtonTitleRes = if (origamiTrackerType == OrigamiTrackerType.DIET) {
54 R.string.origami_history_primary_button // the primary button should always show "Add" for the DIET tracker
55 } else {
56 providePrimaryButtonResource(shouldShowUpdateLabel)
57 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/model/DetailsUiConfiguration.kt:60:9Line detected, which is longer than the defined maximum line length in the code style.
57 }
58 }
59
60 fun provideAvailableTimeFramesFromTrackerType(origamiTrackerType: OrigamiTrackerType) = when (origamiTrackerType) {
61 OrigamiTrackerType.ALCOHOL,
62 OrigamiTrackerType.BLOOD_GLUCOSE,
63 OrigamiTrackerType.BLOOD_PRESSURE,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/navigation/NavigationViewModel.kt:170:5Line detected, which is longer than the defined maximum line length in the code style.
167
168 override val shouldNavigateToAlcoholConditionalScreen: TypedNavigationLiveData<DateTime> = TypedNavigationLiveData()
169
170 override val shouldNavigateToBloodGlucoseConditionalScreen: TypedNavigationLiveData<DateTime> = TypedNavigationLiveData()
171
172 override val shouldNavigateToSmokeConditionalScreen: TypedNavigationLiveData<DateTime> = TypedNavigationLiveData()
173
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/navigation/NavigationViewModel.kt:176:5Line detected, which is longer than the defined maximum line length in the code style.
173
174 override val shouldNavigateToWeightConditionalScreen: TypedNavigationLiveData<DateTime> = TypedNavigationLiveData()
175
176 override val shouldNavigateToSubmissionScreenInCreateMode: TypedNavigationLiveData<DateTime> = TypedNavigationLiveData()
177
178 override val shouldNavigateToSubmissionScreenInEditMode: TypedNavigationLiveData<Pair<TrackerItem?, SubmissionOpenedFrom>> = TypedNavigationLiveData()
179
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/navigation/NavigationViewModel.kt:178:5Line detected, which is longer than the defined maximum line length in the code style.
175
176 override val shouldNavigateToSubmissionScreenInCreateMode: TypedNavigationLiveData<DateTime> = TypedNavigationLiveData()
177
178 override val shouldNavigateToSubmissionScreenInEditMode: TypedNavigationLiveData<Pair<TrackerItem?, SubmissionOpenedFrom>> = TypedNavigationLiveData()
179
180 override val shouldNavigateToMedicationCabinetScreen: NavigationLiveData = NavigationLiveData()
181
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/navigation/NavigationViewModel.kt:182:5Line detected, which is longer than the defined maximum line length in the code style.
179
180 override val shouldNavigateToMedicationCabinetScreen: NavigationLiveData = NavigationLiveData()
181
182 override val shouldNavigateToMedicationSubmissionScreen: TypedNavigationLiveData<TrackerItem> = TypedNavigationLiveData()
183
184 override val shouldNavigateToMedicationConditionalScreen: NavigationLiveData = NavigationLiveData()
185
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/navigation/NavigationViewModel.kt:188:9Line detected, which is longer than the defined maximum line length in the code style.
185
186 private val todayTrackerItems: LiveData<List<TrackerItem>> = selectedTrackerType.switchMap {
187 // holds all tracker items with today date
188 trackerHistoryRepository.getDayTrackerHistoryItems(it, gdtConfiguration.getUpdatableDays(), DateTime.now().toTrackerDateString())
189 }
190
191 private val shouldShowUpdateLabel: LiveData<Boolean> = selectedTrackerType.combineLatest(todayTrackerItems).map {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/navigation/NavigationViewModel.kt:248:21Line detected, which is longer than the defined maximum line length in the code style.
245 if (selectedTrackerType.value == OrigamiTrackerType.MEDICATION_GROUP) {
246 shouldNavigateToSubmissionScreenInCreateMode.requestNavigationWith(date)
247 } else {
248 shouldNavigateToSubmissionScreenInEditMode.requestNavigationWith(Pair(trackerItemToEdit, submissionOpenedFrom))
249 }
250 } else {
251 // if we just create a new tracker – we simply open the submission screen
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/navigation/NavigationViewModel.kt:258:17Line detected, which is longer than the defined maximum line length in the code style.
255 // if the configuration is not set yet , we open configuration screen
256 when (selectedTrackerType.value) {
257 OrigamiTrackerType.ALCOHOL -> shouldNavigateToAlcoholConditionalScreen.requestNavigationWith(date)
258 OrigamiTrackerType.BLOOD_GLUCOSE -> shouldNavigateToBloodGlucoseConditionalScreen.requestNavigationWith(date)
259 OrigamiTrackerType.SMOKE -> shouldNavigateToSmokeConditionalScreen.requestNavigationWith(date)
260 OrigamiTrackerType.WEIGHT -> shouldNavigateToWeightConditionalScreen.requestNavigationWith(date)
261 OrigamiTrackerType.MEDICATION_GROUP -> shouldNavigateToMedicationConditionalScreen.requestNavigation()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/navigation/NavigationViewModel.kt:267:9Line detected, which is longer than the defined maximum line length in the code style.
264 }
265
266 override fun openMedicationOrConditionalScreen() {
267 val configuration = configurationRepository.getConfigurationSynchronously(sharedPreferencesRepository.getSelectedDate().toTrackerDate()!!)
268 if (configuration?.medicationSettingList.isNullOrEmpty()) {
269 shouldNavigateToMedicationConditionalScreen.requestNavigation()
270 } else {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/navigation/NavigationViewModelFactory.kt:32:25Line detected, which is longer than the defined maximum line length in the code style.
29 LiveSharedPreferencesRepositoryImpl(Origami.liveSharedPreferences!!),
30 OrigamiSharedPreferencesRepositoryImpl(Origami.sharedPreferences!!),
31 ConfigurationRepositoryImpl(
32 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
33 Origami.getDatabaseInstance().trackerConfigurationModel(),
34 OrigamiSharedPreferencesRepositoryImpl(Origami.sharedPreferences!!)
35 ),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/navigation/NavigationViewModelFactory.kt:37:25Line detected, which is longer than the defined maximum line length in the code style.
34 OrigamiSharedPreferencesRepositoryImpl(Origami.sharedPreferences!!)
35 ),
36 TrackerHistoryRepositoryImpl(
37 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
38 Origami.getDatabaseInstance().trackerHistoryModel(),
39 Origami.getDatabaseInstance().medicationNameModel(),
40 Origami.getDatabaseInstance().medicationConfigurationModel()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/navigation/NavigationViewModelFactory.kt:42:17Line detected, which is longer than the defined maximum line length in the code style.
39 Origami.getDatabaseInstance().medicationNameModel(),
40 Origami.getDatabaseInstance().medicationConfigurationModel()
41 ),
42 ConfigurationManager().getConfiguration().getFeatureConfiguration(FeatureConfigurationType.GDT) as GDTConfiguration
43 ) as T
44 }
45 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/selector/SelectorAdapter.kt:21:23Line detected, which is longer than the defined maximum line length in the code style.
18 * to switch between the tracker types
19 */
20 class SelectorAdapter(private val context: Context,
21 private var onItemClickListener: OnItemClickListener? = null, // an action for selecting the tracker
22 private val listBinder: ListBinder<SelectorModel> = ListBinder(SelectorListDiffCallback()),
23 private var entries: MutableList<SelectorModel> = mutableListOf())
24 : RecyclerView.Adapter<SelectorAdapter.SelectorViewHolder>() {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/selector/SelectorAdapter.kt:71:17Line detected, which is longer than the defined maximum line length in the code style.
68
69 companion object {
70 fun create(parent: ViewGroup, context: Context): SelectorViewHolder {
71 val binding = DataBindingUtil.inflate<ItemTrackerSelectorViewBinding>(LayoutInflater.from(parent.context),
72 R.layout.item_tracker_selector_view, parent, false)
73 return SelectorViewHolder(binding, context)
74 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/selector/SelectorFragment.kt:20:5Line detected, which is longer than the defined maximum line length in the code style.
17 * when a user taps on the title of the details fragment.
18 */
19 class SelectorFragment : ViewBindingFragment<FragmentTrackerSelectorBinding>() {
20 private val listViewModel: TrackerSelectorViewModel by viewModels<TrackerSelectorViewModelImpl> { SelectorViewModelFactory() }
21
22 override fun initViewBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentTrackerSelectorBinding =
23 FragmentTrackerSelectorBinding.inflate(inflater, container, false)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/selector/SelectorViewModel.kt:42:5Line detected, which is longer than the defined maximum line length in the code style.
39 private val sharedPreferencesRepository: OrigamiSharedPreferencesRepository,
40 gdtFeatureConfiguration: GDTConfiguration) : ViewModel(), TrackerSelectorViewModel {
41
42 private val selectedTrackerType: LiveData<OrigamiTrackerType?> = liveSharedPreferencesRepository.getSelectedTrackerTypeAsLiveData()
43
44 override val trackerItems: LiveData<List<SelectorModel>> = selectedTrackerType.map { selectedTrackerType ->
45 OrigamiTrackerType.valuesForUser(isMedicationTrackerSupported).map {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/details/selector/SelectorViewModel.kt:78:5Line detected, which is longer than the defined maximum line length in the code style.
75 * Some markets don't support medication – in this case the medication tracker should be excluded
76 * from the list of possible trackers that a user can open
77 */
78 private val isMedicationTrackerSupported: Boolean = gdtFeatureConfiguration.isTrackerSupported(OrigamiTrackerType.MEDICATION_GROUP)
79 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/externaltrackers/SourceConfirmationFragment.kt:17:2Line detected, which is longer than the defined maximum line length in the code style.
14 import com.sharecare.realgreen.origami.presentation.settings.SettingsFragment
15
16 /**
17 * SourceConfirmationFragment is a simple fragment that is shown when an external source (ex. Google Fit, Fitbit, Samsung Health)
18 * is linked. It doesn't have any hardcore logic – just a confirmation button.
19 */
20 class SourceConfirmationFragment : ViewBindingFragment<FragmentTrackerSourceConfirmationBinding>() {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/externaltrackers/SourceConfirmationFragment.kt:29:9Line detected, which is longer than the defined maximum line length in the code style.
26
27 private fun initView() {
28 val sourceType = arguments?.getSerializable(SettingsFragment.EXTRA_SOURCE_TYPE) as? Source.SourceType
29 binding.content.icon.setImageDrawable(AppCompatResources.getDrawable(requireContext(), R.drawable.ic_tofu_thumbs_up))
30 binding.content.title.text = resources.getString(R.string.tracker_source_confirmation_title)
31 getSourceTypeName(sourceType).apply {
32 binding.content.description.text = String.format("%s %s",
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/externaltrackers/SourceConfirmationFragment.kt:65:5Line detected, which is longer than the defined maximum line length in the code style.
62 }
63 }
64
65 override fun initViewBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentTrackerSourceConfirmationBinding = FragmentTrackerSourceConfirmationBinding.inflate(inflater, container, false)
66
67 override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
68 this.getNavigationController().hideBottomMenu()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/externaltrackers/SourceDetailFragment.kt:23:2Line detected, which is longer than the defined maximum line length in the code style.
20 /**
21 * SourceDetailFragment is shown when an external source (ex. Google Fit, Fitbit, Samsung Health) is linked
22 * and we click on a cog-wheel button on the SettingsFramgent.
23 * It provides an option to disconnect the external source and also to open a support link to read more about the tracking
24 */
25 class SourceDetailFragment : ViewBindingFragment<FragmentTrackerSettingsDataSourcesDetailBinding>() {
26
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/externaltrackers/SourceDetailFragment.kt:28:9Line detected, which is longer than the defined maximum line length in the code style.
25 class SourceDetailFragment : ViewBindingFragment<FragmentTrackerSettingsDataSourcesDetailBinding>() {
26
27 private val vm: SourceDetailViewModel by viewModels<SourceDetailViewModelImpl> {
28 SourceDetailViewModelFactory(arguments?.getSerializable(EXTRA_TRACKER_USER_SETTING_TYPE) as? TrackerUserSettingType)
29 }
30
31 override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/externaltrackers/SourceDetailFragment.kt:40:13Line detected, which is longer than the defined maximum line length in the code style.
37 private fun initView() {
38 setupToolbar()
39 binding.description.text = if (vm.provideToolbarTitleResource() != null) {
40 String.format("%s ", getString(R.string.tracker_settings_data_source_description_learn_more, getString(vm.provideToolbarTitleResource()!!)))
41 } else {
42 ""
43 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/externaltrackers/SourceDetailFragment.kt:78:5Line detected, which is longer than the defined maximum line length in the code style.
75 }
76 }
77
78 override fun initViewBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentTrackerSettingsDataSourcesDetailBinding =
79 FragmentTrackerSettingsDataSourcesDetailBinding.inflate(inflater, container, false)
80
81 private fun setupToolbar() {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/externaltrackers/SourceDetailViewModel.kt:65:33Line detected, which is longer than the defined maximum line length in the code style.
62
63 class SourceDetailViewModelImpl(private val trackerUserSettingType: TrackerUserSettingType?,
64 private val sharedPreferencesRepository: OrigamiSharedPreferencesRepository,
65 private val trackerSettingsRepository: TrackerSettingsRepository) : ViewModel(), SourceDetailViewModel {
66 override fun provideToolbarTitleResource(): Int? =
67 when (trackerUserSettingType) {
68 TrackerUserSettingType.GOOGLE_FIT -> R.string.google_fit_source
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/externaltrackers/SourceDetailViewModelFactory.kt:15:1Line detected, which is longer than the defined maximum line length in the code style.
12 /**
13 * A factory to provide a ViewModel for the Source detail fragment
14 */
15 class SourceDetailViewModelFactory(private val trackerUserSettingType: TrackerUserSettingType?) : ViewModelProvider.Factory {
16
17 @Suppress("UNCHECKED_CAST")
18 override fun <T : ViewModel> create(modelClass: Class<T>): T = SourceDetailViewModelImpl(trackerUserSettingType,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/externaltrackers/SourceDetailViewModelFactory.kt:20:13Line detected, which is longer than the defined maximum line length in the code style.
17 @Suppress("UNCHECKED_CAST")
18 override fun <T : ViewModel> create(modelClass: Class<T>): T = SourceDetailViewModelImpl(trackerUserSettingType,
19 OrigamiSharedPreferencesRepositoryImpl(Origami.sharedPreferences!!),
20 TrackerSettingsRepositoryImpl(ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
21 OrigamiSharedPreferencesRepositoryImpl(Origami.sharedPreferences!!))) as T
22 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/gdtpermissions/GdtPermissionsActivity.kt:61:13Line detected, which is longer than the defined maximum line length in the code style.
58
59 private fun initActionButton() {
60 binding.actionButton.setOnClickListener {
61 if (pagerAdapter.fragmentMap[binding.pagerIntroduction.currentItem]!!::class.java == GdtPermissionsFragment::class.java) {
62 checkPermissions()
63 binding.actionButton.isClickable = false
64 } else {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/gdtpermissions/GdtPermissionsActivity.kt:78:13Line detected, which is longer than the defined maximum line length in the code style.
75 }
76
77 when (PermissionsUtil.checkPermissions(this, permissionList)) {
78 PermissionsUtil.PermissionState.MAY_BE_ASKED, PermissionsUtil.PermissionState.PREVIOUSLY_DENIED -> ActivityCompat.requestPermissions(this,
79 permissionList.permissionNames,
80 RequestCode.PERMISSIONS_MAIN_REQUEST_CODE)
81 PermissionsUtil.PermissionState.PERMANENTLY_DISABLED -> onGoNext()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/gdtpermissions/GdtPermissionsActivity.kt:137:13Line detected, which is longer than the defined maximum line length in the code style.
134
135 override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
136 if (GoogleFitTool.GOOGLE_FIT_PERMISSIONS_REQUEST_CODE == requestCode) {
137 pagerAdapter.fragmentMap[binding.pagerIntroduction.currentItem]?.onActivityResult(requestCode, resultCode, data)
138 } else {
139 super.onActivityResult(requestCode, resultCode, data)
140 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/gdtpermissions/SleepOnboardingActivity.kt:32:9Line detected, which is longer than the defined maximum line length in the code style.
29
30 override fun onCreate(savedInstanceState: Bundle?) {
31 super.onCreate(savedInstanceState)
32 binding = DataBindingUtil.setContentView<ActivitySleepOnboardingBinding>(this, R.layout.activity_sleep_onboarding)
33 val deepLinkPageName = intent.extras?.getBundle(SleepOnboardingDestination.DEEP_LINK_EXTRA)?.getString(DEEP_LINK_PAGE_EXTRA)
34 val needToAddAllSlides = deepLinkPageName?.equals(DeepLinkPage.PREPERMISSION.name) ?: true
35 initSlides(needToAddAllSlides)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/gdtpermissions/SleepOnboardingActivity.kt:33:9Line detected, which is longer than the defined maximum line length in the code style.
30 override fun onCreate(savedInstanceState: Bundle?) {
31 super.onCreate(savedInstanceState)
32 binding = DataBindingUtil.setContentView<ActivitySleepOnboardingBinding>(this, R.layout.activity_sleep_onboarding)
33 val deepLinkPageName = intent.extras?.getBundle(SleepOnboardingDestination.DEEP_LINK_EXTRA)?.getString(DEEP_LINK_PAGE_EXTRA)
34 val needToAddAllSlides = deepLinkPageName?.equals(DeepLinkPage.PREPERMISSION.name) ?: true
35 initSlides(needToAddAllSlides)
36 initActionButton(needToAddAllSlides)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/gdtpermissions/SleepOnboardingActivity.kt:77:13Line detected, which is longer than the defined maximum line length in the code style.
74
75 override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
76 if (GoogleFitTool.GOOGLE_FIT_PERMISSIONS_REQUEST_CODE == requestCode) {
77 pagerAdapter.fragmentMap[binding.pagerIntroduction.currentItem]?.onActivityResult(requestCode, resultCode, data)
78 } else {
79 super.onActivityResult(requestCode, resultCode, data)
80 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/gdtpermissions/SleepOnboardingActivity.kt:89:13Line detected, which is longer than the defined maximum line length in the code style.
86
87 private fun checkPermissions() {
88 when (PermissionsUtil.checkPermissions(this, PermissionsUtil.PermissionValue.MICROPHONE)) {
89 PermissionsUtil.PermissionState.MAY_BE_ASKED, PermissionsUtil.PermissionState.PREVIOUSLY_DENIED -> ActivityCompat.requestPermissions(this,
90 PermissionsUtil.PermissionValue.STRESS_ALL.permissionNames,
91 RequestCode.PERMISSIONS_MAIN_REQUEST_CODE)
92 PermissionsUtil.PermissionState.PERMANENTLY_DISABLED -> showDialogToOpenSettigns()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/gdtpermissions/SleepOnboardingSourceFragment.kt:62:21Line detected, which is longer than the defined maximum line length in the code style.
59 }
60 } else {
61 Snackbar.make(binding.root, getString(R.string.google_fit_not_installed_message), Snackbar.LENGTH_LONG)
62 .setAction(getString(R.string.btn_google_fit_not_installed_action)) { GoogleFitTool.openGoogleFitOnPlayStore(requireActivity()) }.show()
63 }
64 }
65
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/gdtpermissions/SleepOnboardingSourceFragment.kt:69:17Line detected, which is longer than the defined maximum line length in the code style.
66 private fun setupSources() {
67 setSourceStatus(binding.googleFitConnect, binding.googleFitDisconnect, binding
68 .textViewGoogleFit,
69 GoogleFitTool.isGoogleFitInstalled(requireActivity()) && GoogleFitTool.isUserSubscribed(requireActivity()))
70 }
71
72 private fun setSourceStatus(materialButtonConnect: MaterialButton,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/info/general/GeneralInfoFragment.kt:31:9Line detected, which is longer than the defined maximum line length in the code style.
28 private fun initView(){
29 TrackerAnalytics.reportGeneralTrackerInfoPageView()
30 setupToolbar()
31 TrackerSupportLinkUtil.injectDevicesAndApplicationsSupportCustomerSupportPath(requireContext(), binding.description1)
32 TrackerSupportLinkUtil.injectLivingInGreenScaleTrackerCustomerSupportPath(requireContext(), binding.description2)
33 }
34
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/info/general/GeneralInfoFragment.kt:32:9Line detected, which is longer than the defined maximum line length in the code style.
29 TrackerAnalytics.reportGeneralTrackerInfoPageView()
30 setupToolbar()
31 TrackerSupportLinkUtil.injectDevicesAndApplicationsSupportCustomerSupportPath(requireContext(), binding.description1)
32 TrackerSupportLinkUtil.injectLivingInGreenScaleTrackerCustomerSupportPath(requireContext(), binding.description2)
33 }
34
35 private fun setupToolbar() {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/info/notification/AutomaticTrackingInfoActivity.kt:19:1Line detected, which is longer than the defined maximum line length in the code style.
16 /**
17 * This activity is shown when a user taps on a notification that says that their steps and/or sleep are being tracked
18 */
19 class AutomaticTrackingInfoActivity : BaseMvpActivity<AutomaticTrackingInfoPresenter, AutomaticInfoTrackingMvp>(), AutomaticInfoTrackingMvp {
20 private lateinit var binding: ActivityTrackingInfoBinding
21 private lateinit var viewPager: ViewPager
22 private lateinit var itemsToShow: MutableList<InfoPage>
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/info/notification/AutomaticTrackingInfoActivity.kt:103:9Line detected, which is longer than the defined maximum line length in the code style.
100 }
101
102 private fun updateButtonText(position: Int) {
103 binding.keepButton.text = makeText(resources, R.string.btn_automatic_tracking_keep_tracking, itemsToShow[position].buttonsPostfix)
104 binding.stopButton.text = makeText(resources, R.string.btn_automatic_tracking_stop_tracking, itemsToShow[position].buttonsPostfix)
105 }
106
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/info/notification/AutomaticTrackingInfoActivity.kt:104:9Line detected, which is longer than the defined maximum line length in the code style.
101
102 private fun updateButtonText(position: Int) {
103 binding.keepButton.text = makeText(resources, R.string.btn_automatic_tracking_keep_tracking, itemsToShow[position].buttonsPostfix)
104 binding.stopButton.text = makeText(resources, R.string.btn_automatic_tracking_stop_tracking, itemsToShow[position].buttonsPostfix)
105 }
106
107 private fun createPages(): MutableList<InfoPage> {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/info/notification/AutomaticTrackingInfoPresenter.kt:10:1Line detected, which is longer than the defined maximum line length in the code style.
7 import com.sharecare.realgreen.origami.repository.TrackerSettingsRepository
8 import com.sharecare.realgreen.origami.repository.TrackerSettingsRepositoryImpl
9
10 class AutomaticTrackingInfoPresenter(private val trackerUserSettingsRepository: TrackerSettingsRepository = TrackerSettingsRepositoryImpl.provideToExternalModule())
11 : MvpPresenter<AutomaticInfoTrackingMvp>() {
12
13 override fun onViewAttached() {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/info/notification/InfoPage.kt:15:5Line detected, which is longer than the defined maximum line length in the code style.
12 @StringRes val buttonsPostfix: Int,
13 val settingType: SettingType
14 ) {
15 STEPS(R.drawable.tofu_automatic_step, R.string.automatic_tracking_steps_title, R.string.automatic_tracking_steps_description, R.string.automatic_tracking_steps_postfix, SettingType.STEPS),
16 SLEEP(R.drawable.tofu_automatic_sleep, R.string.automatic_tracking_sleep_title, R.string.automatic_tracking_sleep_description, R.string.automatic_tracking_sleep_postfix, SettingType.SLEEP)
17 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/info/notification/InfoPage.kt:16:5Line detected, which is longer than the defined maximum line length in the code style.
13 val settingType: SettingType
14 ) {
15 STEPS(R.drawable.tofu_automatic_step, R.string.automatic_tracking_steps_title, R.string.automatic_tracking_steps_description, R.string.automatic_tracking_steps_postfix, SettingType.STEPS),
16 SLEEP(R.drawable.tofu_automatic_sleep, R.string.automatic_tracking_sleep_title, R.string.automatic_tracking_sleep_description, R.string.automatic_tracking_sleep_postfix, SettingType.SLEEP)
17 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/info/notification/InfoPageAdapter.kt:33:9Line detected, which is longer than the defined maximum line length in the code style.
30 val currentPage = pages[position]
31
32 val inflater = LayoutInflater.from(container.context)
33 val binding: ItemTrackingInfoBinding = DataBindingUtil.inflate(inflater, R.layout.item_tracking_info, container, false)
34
35 binding.title.setText(currentPage.title)
36 binding.description.setText(currentPage.description)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/info/submission/SubmissionInfoFragment.kt:18:5Line detected, which is longer than the defined maximum line length in the code style.
15
16 class SubmissionInfoFragment : ViewBindingFragment<FragmentSubmissionInfoBinding>() {
17
18 private val submissionInfoViewModel: SubmissionInfoViewModel by viewModels<SubmissionInfoViewModelImpl> { SubmissionInfoViewModelFactory() }
19
20 override fun initViewBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentSubmissionInfoBinding =
21 FragmentSubmissionInfoBinding.inflate(inflater, container, false)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/info/submission/SubmissionInfoViewModel.kt:20:1Line detected, which is longer than the defined maximum line length in the code style.
17 val uiConfiguration: SubmissionInfoUiConfiguration?
18 }
19
20 class SubmissionInfoViewModelImpl(private val sharedPreferencesRepository: OrigamiSharedPreferencesRepository) : ViewModel(), SubmissionInfoViewModel {
21
22 private var origamiTrackerType: OrigamiTrackerType? = null
23
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/medication/cabinet/MedicationCabinetFragment.kt:72:9Line detected, which is longer than the defined maximum line length in the code style.
69 cabinetViewModel.shouldNavigateToMedicationSearch.requestNavigation()
70 }
71
72 val medicationInferenceEnabled = ConfigurationManager().getConfiguration().isFeatureEnabled(FeatureToggleType.MEDICATION_INFERENCE)
73 if (medicationInferenceEnabled) {
74 initForScan()
75 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/medication/cabinet/MedicationCabinetFragment.kt:179:9Line detected, which is longer than the defined maximum line length in the code style.
176 ToolbarUtil.setUpElevationToolbar(this)
177 }
178
179 val medicationInferenceEnabled = ConfigurationManager().getConfiguration().isFeatureEnabled(FeatureToggleType.MEDICATION_INFERENCE)
180 if (medicationInferenceEnabled) {
181 setupToolbarForScan()
182 } else {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/medication/cabinet/MedicationCabinetViewModel.kt:180:17Line detected, which is longer than the defined maximum line length in the code style.
177 private fun updateConfiguration(medicationCode: String, dosage: Int, isTracked: Boolean) =
178 configuration?.apply {
179 when {
180 // if medicationSettingList is null, create new configuration list with medication code and dosage values
181 medicationSettingList == null -> {
182 medicationSettingList = listOf(MedicationSetting(medicationCode, dosage))
183 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/medication/cabinet/MedicationCabinetViewModel.kt:194:17Line detected, which is longer than the defined maximum line length in the code style.
191 medicationSettingList!!.plus(MedicationSetting(medicationCode, dosage))
192 }
193 }
194 // if the medicationSettingList is not null and user not tracking medication, remove medication data from the configuration.
195 else -> {
196 medicationSettingList =
197 medicationSettingList!!.minus(medicationSettingList!!.filter { it.rxCode == medicationCode })
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/medication/cabinet/MedicationCabinetViewModelFactory.kt:31:21Line detected, which is longer than the defined maximum line length in the code style.
28 sharedPreferencesRepository)
29 return MedicationCabinetViewModelImpl(
30 MedicationRepositoryImpl(
31 serviceFactory.createService(ServiceFactory.ServiceType.CLINICAL_INFORMATION_SHARECARE) as ClinicalInformationService,
32 serviceFactory.createService(ServiceFactory.ServiceType.PHR_SHARECARE) as PHRService,
33 Origami.getDatabaseInstance().medicationModel()
34 ),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/medication/details/MedicationDetailsFragment.kt:37:5Line detected, which is longer than the defined maximum line length in the code style.
34 class MedicationDetailsFragment : ViewBindingFragment<FragmentMedicationDetailsBinding>(),
35 NavigationSuppressor {
36
37 private val medicationSection by lazy { requireArguments().getSerializable(EXTRA_MEDICATION_DATA) as HPMedicationSection }
38
39 private val viewModel: MedicationDetailsViewModel by viewModels<MedicationDetailsViewModelImpl> {
40 MedicationDetailsViewModelFactory(medicationSection)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/medication/details/MedicationDetailsFragment.kt:307:1Line detected, which is longer than the defined maximum line length in the code style.
304 binding.medicationDetailsTabs.isVisible = isUserMedication
305 // val a = DetailsPagerAdapter(isUserMedication, childFragmentManager, lifecycle)
306 // binding.medicationDetailsPager.adapter = a
307 // TabLayoutMediator(binding.medicationDetailsTabs, binding.medicationDetailsPager) { tab: TabLayout.Tab, position: Int ->
308 // tab.text = when (position) {
309 // 1 -> DetailsTabs.PRICE
310 // else -> DetailsTabs.DETAILS
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/medication/details/MedicationDetailsViewModel.kt:186:1Line detected, which is longer than the defined maximum line length in the code style.
183 }
184
185
186 //TODO: ORIGAMI-MEDICATION: this view model has a lot of logic that should be in the repository level – consider moving it there and make the view model lighter
187 class MedicationDetailsViewModelImpl(
188 private var medicationSection: HPMedicationSection,
189 private val configurationRepository: ConfigurationRepository,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/medication/details/MedicationDetailsViewModelFactory.kt:20:1Line detected, which is longer than the defined maximum line length in the code style.
17 /**
18 * A factory to provide a ViewModel for the Medication Details
19 */
20 class MedicationDetailsViewModelFactory(private val medicationSection: HPMedicationSection) : ViewModelProvider.Factory {
21
22 @Suppress("UNCHECKED_CAST")
23 override fun <T : ViewModel> create(modelClass: Class<T>): T {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/medication/details/MedicationDetailsViewModelFactory.kt:36:25Line detected, which is longer than the defined maximum line length in the code style.
33 return MedicationDetailsViewModelImpl(medicationSection, configurationRepository, sharedPreferencesRepository,
34 MedicationDetailsRepositoryImpl(
35 serviceFactory.createService(ServiceFactory.ServiceType.PHR_SHARECARE) as PHRService,
36 serviceFactory.createService(ServiceFactory.ServiceType.CLINICAL_INFORMATION_SHARECARE) as ClinicalInformationService,
37 Origami.getDatabaseInstance().medicationModel())) as T
38 }
39 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/medication/infosheet/details/MedicationInfoSheetDetailsFragment.kt:16:5Line detected, which is longer than the defined maximum line length in the code style.
13 import com.sharecare.realgreen.origami.presentation.base.ViewBindingFragment
14
15 class MedicationInfoSheetDetailsFragment : ViewBindingFragment<FragmentMedicationInfosheetDetailsBinding>() {
16 private val medicationSection by lazy { requireArguments().getSerializable(EXTRA_PHR_DATA) as MedicationInfoSheetData }
17
18 private val viewModel: MedicationInfoSheetDetailsViewModel by viewModels<MedicationInfoSheetDetailsViewModelImpl> { MedicationInfoSheetDetailsViewModelFactory(medicationSection) }
19
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/medication/infosheet/details/MedicationInfoSheetDetailsFragment.kt:18:5Line detected, which is longer than the defined maximum line length in the code style.
15 class MedicationInfoSheetDetailsFragment : ViewBindingFragment<FragmentMedicationInfosheetDetailsBinding>() {
16 private val medicationSection by lazy { requireArguments().getSerializable(EXTRA_PHR_DATA) as MedicationInfoSheetData }
17
18 private val viewModel: MedicationInfoSheetDetailsViewModel by viewModels<MedicationInfoSheetDetailsViewModelImpl> { MedicationInfoSheetDetailsViewModelFactory(medicationSection) }
19
20 override fun initViewBinding(inflater: LayoutInflater, container: ViewGroup?) =
21 FragmentMedicationInfosheetDetailsBinding.inflate(inflater, container, false)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/medication/infosheet/details/MedicationInfoSheetDetailsViewModelFactory.kt:6:1Line detected, which is longer than the defined maximum line length in the code style.
3 import androidx.lifecycle.ViewModel
4 import androidx.lifecycle.ViewModelProvider
5
6 class MedicationInfoSheetDetailsViewModelFactory(private val medicationSection: MedicationInfoSheetData) : ViewModelProvider.Factory {
7
8 @Suppress("UNCHECKED_CAST")
9 override fun <T : ViewModel> create(modelClass: Class<T>): T {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/medication/infosheet/list/MedicationInfoSheetListFragment.kt:21:5Line detected, which is longer than the defined maximum line length in the code style.
18
19 class MedicationInfoSheetListFragment : ViewBindingFragment<FragmentMedicationInfosheetListBinding>() {
20
21 private val medicationSection by lazy { requireArguments().getSerializable(EXTRA_MEDICATION_DATA) as HPMedicationSection }
22
23 private val viewModel: MedicationInfoSheetListViewModel by viewModels<MedicationInfoSheetListViewModelImpl> { MedicationInfoSheetListViewModelFactory(medicationSection) }
24
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/medication/infosheet/list/MedicationInfoSheetListFragment.kt:23:5Line detected, which is longer than the defined maximum line length in the code style.
20
21 private val medicationSection by lazy { requireArguments().getSerializable(EXTRA_MEDICATION_DATA) as HPMedicationSection }
22
23 private val viewModel: MedicationInfoSheetListViewModel by viewModels<MedicationInfoSheetListViewModelImpl> { MedicationInfoSheetListViewModelFactory(medicationSection) }
24
25 override fun initViewBinding(inflater: LayoutInflater, container: ViewGroup?) =
26 FragmentMedicationInfosheetListBinding.inflate(inflater, container, false)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/medication/infosheet/list/MedicationInfoSheetListFragment.kt:56:41Line detected, which is longer than the defined maximum line length in the code style.
53 infoItemText.tag = it.first
54 infoItemText.setOnClickListener {
55 val d = MedicationInfoSheetData(viewModel.title.value!!,
56 viewModel.ciMedicationInfoSheetSections.value?.first { it.name == infoItemText.tag }!!)
57 MedicationInfoSheetDetailsFragment.start(this@MedicationInfoSheetListFragment, d)
58 }
59 }.root
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/medication/infosheet/list/MedicationInfoSheetListViewModel.kt:40:1Line detected, which is longer than the defined maximum line length in the code style.
37 val ciMedicationInfoSheetSections: LiveData<List<CIMedicationInfosheetSection>?>
38 }
39
40 class MedicationInfoSheetListViewModelImpl(medicationSection: HPMedicationSection) : ViewModel(), MedicationInfoSheetListViewModel {
41
42 private val medicationData = MutableLiveData(medicationSection)
43
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/medication/infosheet/list/MedicationInfoSheetListViewModelFactory.kt:7:1Line detected, which is longer than the defined maximum line length in the code style.
4 import androidx.lifecycle.ViewModelProvider
5 import com.sharecare.phr.models.HPMedicationSection
6
7 class MedicationInfoSheetListViewModelFactory(private val medicationSection: HPMedicationSection) : ViewModelProvider.Factory {
8
9 @Suppress("UNCHECKED_CAST")
10 override fun <T : ViewModel> create(modelClass: Class<T>): T {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/medication/search/MedicationFindingsAdapter.kt:34:13Line detected, which is longer than the defined maximum line length in the code style.
31 }
32
33 override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) =
34 MedicationFindingsViewHolder(ItemMedicationFindingBinding.inflate(LayoutInflater.from(parent.context), parent, false))
35
36 override fun onBindViewHolder(holder: MedicationFindingsViewHolder, position: Int) {
37 holder.bindItem(findings[position])
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/medication/search/MedicationSearchFragment.kt:55:9Line detected, which is longer than the defined maximum line length in the code style.
52 searchViewModel.goToMedicationDetailsPage(it)
53 }
54
55 val medicationInferenceEnabled = ConfigurationManager().getConfiguration().isFeatureEnabled(FeatureToggleType.MEDICATION_INFERENCE)
56 if (medicationInferenceEnabled) showScanButton()
57 }
58
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/medication/search/MedicationSearchFragment.kt:101:21Line detected, which is longer than the defined maximum line length in the code style.
98 AnalyticsCore
99 .action(GeneralAnalytics.Action.MEDICATION_SEARCH)
100 .customParam(GeneralAnalytics.State.SEARCH_KEY_WORD, it.ciMedicationDetailData.match)
101 .customParam(GeneralAnalytics.State.SEARCH_CONTENT, GeneralAnalytics.StateValue.MEDICATION_PREDICTIVE)
102 }
103 }
104 searchViewModel.medicationSearchResults.observe(viewLifecycleOwner) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/medication/search/MedicationSearchFragment.kt:151:29Line detected, which is longer than the defined maximum line length in the code style.
148 AnalyticsCore
149 .action(GeneralAnalytics.Action.MEDICATION_SEARCH)
150 .customParam(GeneralAnalytics.State.SEARCH_KEY_WORD, inputField.text.toString())
151 .customParam(GeneralAnalytics.State.SEARCH_CONTENT, GeneralAnalytics.StateValue.MEDICATION_MANUAL)
152 false
153 }
154 else -> false
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/medication/search/MedicationSearchViewModelFactory.kt:23:25Line detected, which is longer than the defined maximum line length in the code style.
20 return MedicationSearchViewModelImpl(
21 MedicationRepositoryImpl(
22 serviceFactory
23 .createService(ServiceFactory.ServiceType.CLINICAL_INFORMATION_SHARECARE) as ClinicalInformationService,
24 serviceFactory.createService(ServiceFactory.ServiceType.PHR_SHARECARE) as PHRService,
25 Origami.getDatabaseInstance().medicationModel()
26 )
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/settings/SettingsFragment.kt:77:2Line detected, which is longer than the defined maximum line length in the code style.
74 * - conditionalViewModel
75 * - remindersViewModel
76 * Plus extra:
77 * - navigationViewModel - which is used for everything that is just page specific (ex. opening the info screen from the menu)
78 */
79 class SettingsFragment : ViewBindingFragment<FragmentSettingsBinding>() {
80
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/settings/SettingsFragment.kt:81:5Line detected, which is longer than the defined maximum line length in the code style.
78 */
79 class SettingsFragment : ViewBindingFragment<FragmentSettingsBinding>() {
80
81 private val autoTrackingViewModel: AutoTrackingViewModel by viewModels<AutoTrackingViewModelImpl> { AutoTrackingViewModelFactory() }
82
83 private val conditionalViewModel: ConditionalViewModel by viewModels<ConditionalViewModelImpl> { ConditionalViewModelFactory() }
84
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/settings/SettingsFragment.kt:83:5Line detected, which is longer than the defined maximum line length in the code style.
80
81 private val autoTrackingViewModel: AutoTrackingViewModel by viewModels<AutoTrackingViewModelImpl> { AutoTrackingViewModelFactory() }
82
83 private val conditionalViewModel: ConditionalViewModel by viewModels<ConditionalViewModelImpl> { ConditionalViewModelFactory() }
84
85 private val navigationViewModel: NavigationViewModel by viewModels<NavigationViewModelImpl> { NavigationViewModelFactory() }
86
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/settings/SettingsFragment.kt:85:5Line detected, which is longer than the defined maximum line length in the code style.
82
83 private val conditionalViewModel: ConditionalViewModel by viewModels<ConditionalViewModelImpl> { ConditionalViewModelFactory() }
84
85 private val navigationViewModel: NavigationViewModel by viewModels<NavigationViewModelImpl> { NavigationViewModelFactory() }
86
87 private val remindersViewModel: RemindersViewModel by viewModels<RemindersViewModelImpl> { RemindersViewModelFactory() }
88
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/settings/SettingsFragment.kt:87:5Line detected, which is longer than the defined maximum line length in the code style.
84
85 private val navigationViewModel: NavigationViewModel by viewModels<NavigationViewModelImpl> { NavigationViewModelFactory() }
86
87 private val remindersViewModel: RemindersViewModel by viewModels<RemindersViewModelImpl> { RemindersViewModelFactory() }
88
89 private val sourcesViewModel: SourcesViewModel by viewModels<SourcesViewModelImpl> { SourcesViewModelFactory() }
90
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/settings/SettingsFragment.kt:127:21Line detected, which is longer than the defined maximum line length in the code style.
124 }
125 else -> {
126 // In case of an error, we clean the token extra
127 // (it could stay there in teh case of a user connected some other external source before Google Fit)
128 // and we request an error screen to be shown.
129 requireActivity().intent.removeExtra(EXTRA_SOURCE_TOKEN)
130 sourcesViewModel.shouldNavigateToGoogleFitError.requestNavigation()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/settings/SettingsFragment.kt:140:17Line detected, which is longer than the defined maximum line length in the code style.
137 // In this case we get here and request the authorization screen of the source that needs to be linked.
138 when (data.getSerializableExtra(EXTRA_SOURCE_TYPE) as? Source.SourceType) {
139 Source.SourceType.FITBIT -> sourcesViewModel.shouldNavigateToAuthorizationForFitbit.requestNavigation()
140 Source.SourceType.SAMSUNG -> sourcesViewModel.shouldNavigateToAuthorizationForSamsung.requestNavigation()
141 Source.SourceType.GOOGLE_FIT -> sourcesViewModel.shouldNavigateToGoogleFitSetup.requestNavigation()
142 else -> {
143 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/settings/SettingsFragment.kt:322:9Line detected, which is longer than the defined maximum line length in the code style.
319 binding.textViewSmoke.text = resources.getString(it)
320 }
321 // However, the weight tracker has a numeric condition (height).
322 // So the view model provides the string resource ID as the first parameter and an actual height as the second parameter.
323 conditionalViewModel.weightLabelResourceWithHeightValue.observe(viewLifecycleOwner) {
324 binding.textViewWeight.text = resources.getString(it.first, it.second)
325 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/settings/SettingsFragment.kt:326:9Line detected, which is longer than the defined maximum line length in the code style.
323 conditionalViewModel.weightLabelResourceWithHeightValue.observe(viewLifecycleOwner) {
324 binding.textViewWeight.text = resources.getString(it.first, it.second)
325 }
326 // Medication configuration may be either just a text (so the text resource is returned and the other parameter is ignored),
327 // or it can be a text with a number of medications that a user is tracking. In this case the first parameter
328 // contains the string resource and the second one – the number of medications.
329 conditionalViewModel.medicationLabelResourceWithMedicationAmount.observe(viewLifecycleOwner) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/settings/SettingsFragment.kt:339:9Line detected, which is longer than the defined maximum line length in the code style.
336 }
337
338 private fun initSourcesObservers() {
339 // If the Google Fit authorization is requested, we request one of three possible pages depending on the conditions
340 sourcesViewModel.shouldNavigateToGoogleFitSetup.observe(viewLifecycleOwner) {
341 with(sourcesViewModel) {
342 when {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/settings/SettingsFragment.kt:590:5Line detected, which is longer than the defined maximum line length in the code style.
587 }
588
589 // Manages the visibility of the buttons that are used to connect the external sources and disconnect them.
590 // Actually those are not disconnect buttons but info buttons. But user can disconnect the source on the info screen,
591 // so we keep the naming for clarity.
592 private fun setSourceStatus(
593 materialButtonConnect: MaterialButton,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/settings/SettingsFragment.kt:691:5Line detected, which is longer than the defined maximum line length in the code style.
688 )
689 }
690
691 // If the permission has been granted – update the steps autotracking to be switched on, otherwise keep it switched off.
692 override fun onRequestPermissionsResult(requestCode: Int, permissions: Array<out String>, grantResults: IntArray) {
693 super.onRequestPermissionsResult(requestCode, permissions, grantResults)
694 if (RequestCode.PERMISSIONS_MAIN_REQUEST_CODE == requestCode) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/settings/autotracking/AutoTrackingViewModel.kt:59:13Line detected, which is longer than the defined maximum line length in the code style.
56 onSuccessUpdateSteps(isAutoTracked, context)
57 }
58 )
59 sharedPreferencesRepository.removeDashboardLastUpdatedMoment() // so that once we return to the dashboard it would trigger an update
60 }
61 }
62
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/settings/autotracking/AutoTrackingViewModel.kt:95:13Line detected, which is longer than the defined maximum line length in the code style.
92 onSuccessUpdateSleep(isAutoTracked, context)
93 }
94 )
95 sharedPreferencesRepository.removeDashboardLastUpdatedMoment() // so that once we return to the dashboard it would trigger an update
96 }
97 }
98
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/settings/autotracking/AutoTrackingViewModelFactory.kt:21:25Line detected, which is longer than the defined maximum line length in the code style.
18 override fun <T : ViewModel> create(modelClass: Class<T>): T {
19 return AutoTrackingViewModelImpl(
20 TrackerSettingsRepositoryImpl(
21 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
22 OrigamiSharedPreferencesRepositoryImpl(Origami.sharedPreferences!!)
23 ),
24 LiveSharedPreferencesRepositoryImpl(Origami.liveSharedPreferences!!),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/settings/conditional/ConditionalViewModel.kt:62:6Line detected, which is longer than the defined maximum line length in the code style.
59 val bloodGlucoseLabelResource: LiveData<Int>
60
61 /**
62 * A pair of string resource for the medicaiton label with an amount of medication tracked (null if no medication is tracked)
63 */
64 val medicationLabelResourceWithMedicationAmount: LiveData<Pair<Int, Int?>>
65
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/settings/conditional/ConditionalViewModel.kt:99:5Line detected, which is longer than the defined maximum line length in the code style.
96
97 override val shouldNavigateToWeightConfiguration: NavigationLiveData = NavigationLiveData()
98
99 override val isMedicationTrackerSupported: Boolean = gdtFeatureConfiguration.isTrackerSupported(OrigamiTrackerType.MEDICATION_GROUP)
100
101 override val alcoholLabelResource: LiveData<Int>
102 get() = trackerConfiguration.map {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/settings/conditional/ConditionalViewModelFactory.kt:24:25Line detected, which is longer than the defined maximum line length in the code style.
21 override fun <T : ViewModel> create(modelClass: Class<T>): T {
22 return ConditionalViewModelImpl(
23 ConfigurationRepositoryImpl(
24 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
25 Origami.getDatabaseInstance().trackerConfigurationModel(),
26 OrigamiSharedPreferencesRepositoryImpl(Origami.sharedPreferences!!)
27 ),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/settings/reminders/RemindersViewModel.kt:92:30Line detected, which is longer than the defined maximum line length in the code style.
89 }
90
91 class RemindersViewModelImpl(private val reminderRepository: ReminderRepository,
92 private val liveSharedPreferencesRepository: LiveSharedPreferencesRepository) : ViewModel(), RemindersViewModel {
93 override fun switchDailyTrackingReminder(isReminderOn: Boolean, context: Context) {
94 reminderRepository.switchDailyTrackingReminder(isReminderOn, context)
95 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/settings/reminders/RemindersViewModel.kt:97:5Line detected, which is longer than the defined maximum line length in the code style.
94 reminderRepository.switchDailyTrackingReminder(isReminderOn, context)
95 }
96
97 override val isDailyTrackingReminderOn: LivePreference<Boolean> = liveSharedPreferencesRepository.isDailyTrackingReminderOnAsLiveData()
98
99 override val dailyTrackingReminderTime: LiveData<DateTime> = liveSharedPreferencesRepository.getDailyTrackingReminderTimeAsLiveData()
100 .map {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/settings/reminders/RemindersViewModel.kt:99:5Line detected, which is longer than the defined maximum line length in the code style.
96
97 override val isDailyTrackingReminderOn: LivePreference<Boolean> = liveSharedPreferencesRepository.isDailyTrackingReminderOnAsLiveData()
98
99 override val dailyTrackingReminderTime: LiveData<DateTime> = liveSharedPreferencesRepository.getDailyTrackingReminderTimeAsLiveData()
100 .map {
101 if (it != null) {
102 DateTime(it)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/settings/reminders/RemindersViewModel.kt:118:5Line detected, which is longer than the defined maximum line length in the code style.
115 reminderRepository.switchMedicationReminder(isReminderOn, context)
116 }
117
118 override val isMedicationReminderOn: LivePreference<Boolean> = liveSharedPreferencesRepository.isMedicationReminderOnAsLiveData()
119
120 override val medicationReminderTime: LiveData<DateTime> = liveSharedPreferencesRepository.getMedicationReminderTimeAsLiveData()
121 .map {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/settings/reminders/RemindersViewModel.kt:120:5Line detected, which is longer than the defined maximum line length in the code style.
117
118 override val isMedicationReminderOn: LivePreference<Boolean> = liveSharedPreferencesRepository.isMedicationReminderOnAsLiveData()
119
120 override val medicationReminderTime: LiveData<DateTime> = liveSharedPreferencesRepository.getMedicationReminderTimeAsLiveData()
121 .map {
122 if (it != null) {
123 DateTime(it)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/settings/reminders/RemindersViewModel.kt:139:5Line detected, which is longer than the defined maximum line length in the code style.
136 reminderRepository.switchSleepReminder(isReminderOn, context)
137 }
138
139 override val isSleepReminderOn: LivePreference<Boolean> = liveSharedPreferencesRepository.isSleepReminderOnAsLiveData()
140
141 override val sleepReminderTime: LiveData<DateTime> = liveSharedPreferencesRepository.getSleepReminderTimeAsLiveData()
142 .map {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/settings/reminders/RemindersViewModel.kt:141:5Line detected, which is longer than the defined maximum line length in the code style.
138
139 override val isSleepReminderOn: LivePreference<Boolean> = liveSharedPreferencesRepository.isSleepReminderOnAsLiveData()
140
141 override val sleepReminderTime: LiveData<DateTime> = liveSharedPreferencesRepository.getSleepReminderTimeAsLiveData()
142 .map {
143 if (it != null) {
144 DateTime(it)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/settings/sources/SourcesViewModel.kt:227:9Line detected, which is longer than the defined maximum line length in the code style.
224 override val shouldNavigateToSamsungConfirmation: NavigationLiveData = NavigationLiveData()
225
226 override fun onSamsungConnected(token: String) {
227 SamsungHealthTool.optIn(token, SamsungHealthTool.SAMSUNG_REDIRECT_SCHEME_TRACKER_SETTINGS, object : RequestListener {
228 override fun onSuccess() {
229 shouldNavigateToSamsungConfirmation.requestNavigation()
230 trackerSettingsRepository.updateSamsungHealth(true)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/settings/sources/screens/TrackerSourceConfirmationActivity.kt:23:9Line detected, which is longer than the defined maximum line length in the code style.
20 binding.content.icon.setImageDrawable(getDrawable(R.drawable.ic_tofu_thumbs_up))
21 binding.content.title.text = getString(R.string.tracker_source_confirmation_title, sourceTypeName)
22
23 binding.content.description.text = String.format("%s %s", getString(R.string.tracker_source_confirmation_subtitle, sourceTypeName),
24 getString(R.string.tracker_source_confirmation_message, sourceTypeName, sourceTypeName))
25
26 initActionButton()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/settings/sources/screens/TrackerSourceErrorActivity.kt:31:17Line detected, which is longer than the defined maximum line length in the code style.
28 binding.actionButton.setOnClickListener {
29 val intent = Intent().apply {
30 putExtra(EXTRA_NEEDS_RETRY, true)
31 putExtra(SettingsFragment.EXTRA_SOURCE_TYPE, intent.getSerializableExtra(SettingsFragment.EXTRA_SOURCE_TYPE))
32 }
33 setResult(Activity.RESULT_OK, intent)
34 finish()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModel.kt:51:6Line detected, which is longer than the defined maximum line length in the code style.
48 val uiConfiguration: SubmissionUiConfiguration?
49
50 /**
51 * Represents a list of tabs to show on a submission screen; normally if there is only a single tab, then the tab UI is hidden.
52 */
53 fun provideTabConfiguration(): TabConfiguration?
54
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModel.kt:92:6Line detected, which is longer than the defined maximum line length in the code style.
89 val idForJobScheduler: LiveData<String>
90
91 /**
92 * There are some cases (ex. submitting DIET via CAMERA) when a submission is happening in a modal fragment, so once it's done,
93 * the result is provided via this LiveData. Right now it's a pair of food image and food label but it may be extended in the future
94 * if more trackers will be submitted from the modal screen.
95 */
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModel.kt:93:6Line detected, which is longer than the defined maximum line length in the code style.
90
91 /**
92 * There are some cases (ex. submitting DIET via CAMERA) when a submission is happening in a modal fragment, so once it's done,
93 * the result is provided via this LiveData. Right now it's a pair of food image and food label but it may be extended in the future
94 * if more trackers will be submitted from the modal screen.
95 */
96 val customDietDataAfterCameraSubmission: LiveData<Pair<String, String>?>
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModel.kt:198:5Line detected, which is longer than the defined maximum line length in the code style.
195 override val shouldSaveTracker: NavigationLiveData = NavigationLiveData()
196 override val shouldCheckCameraPermissions: NavigationLiveData = NavigationLiveData()
197 override val shouldCheckStoragePermissions: NavigationLiveData = NavigationLiveData()
198 override val shouldShowConfirmation: TypedNavigationLiveData<ConfirmationDescriptionContainer> = TypedNavigationLiveData()
199 override val shouldGoBack: NavigationLiveData = NavigationLiveData()
200 override val shouldSyncSteps: NavigationLiveData = NavigationLiveData()
201 override val shouldShowWizard: NavigationLiveData = NavigationLiveData()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModel.kt:254:6Line detected, which is longer than the defined maximum line length in the code style.
251 }
252
253 /**
254 * Represents a list of tabs to show on a submission screen; normally if there is only a single tab, then the tab UI is hidden.
255 * By default a SingleTabConfiguration is requested. If the view requires more than one tab, override this field in a corresponding view model
256 * (see DietSubmissionViewModelImpl as an example)
257 */
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModel.kt:255:6Line detected, which is longer than the defined maximum line length in the code style.
252
253 /**
254 * Represents a list of tabs to show on a submission screen; normally if there is only a single tab, then the tab UI is hidden.
255 * By default a SingleTabConfiguration is requested. If the view requires more than one tab, override this field in a corresponding view model
256 * (see DietSubmissionViewModelImpl as an example)
257 */
258 override fun provideTabConfiguration(): TabConfiguration? {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModel.kt:279:6Line detected, which is longer than the defined maximum line length in the code style.
276 * Each tracker type belongs to a single domain, so any submission view model should override
277 * either provideTrackerMsOrNull OR provideTrackerDataOrNull.
278 * In case a tracker needs a special treatment (ex. Steps that is submitted in a different way),
279 * then that view model should override the general saveTracker() method and handle the data according to it's needs.
280 *
281 * Important: if overriding saveTracker() – don't forget to handle isInProgress properly to prevent
282 * multiple clicks.
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModel.kt:287:5Line detected, which is longer than the defined maximum line length in the code style.
284 open fun provideTrackerMsOrNull(): Tracker? = null
285 open fun provideTrackerDataOrNull(): TrackerData? = null
286
287 override val activeTrackerTabId: LiveData<TrackerTabId?> = submissionSharedPreferencesRepository.getActiveTabIdAsLiveData(origamiTrackerType).map {
288 it ?: provideTabConfiguration()?.provideTabsToShow()?.firstOrNull()?.id
289 }
290 override val activeTrackerTab: LiveData<TrackerTab?> = activeTrackerTabId.map { trackerTabId ->
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModel.kt:315:25Line detected, which is longer than the defined maximum line length in the code style.
312 isInProgress = true
313 trackerRepository.submitTrackerMs(
314 id, _selectedDate.value!!, provideTrackerMsOrNull()!!,
315 TrackerRepositoryImpl.DeletionPolicyOfLegacyTrackers.fromSubmissionParams(isLegacyTrackerToDelete, origamiTrackerType)
316 ) {
317 // we post an id of the TrackerMs to be synced
318 _idForJobScheduler.postValue(it)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModel.kt:321:25Line detected, which is longer than the defined maximum line length in the code style.
318 _idForJobScheduler.postValue(it)
319 // finally we request to go to the previous screen
320 isInProgress = false
321 sharedPreferencesRepository.removeDashboardLastUpdatedMoment() // so that once we return to the dashboard it would trigger an update
322 shouldGoBack.requestNavigation()
323 }
324 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModel.kt:339:25Line detected, which is longer than the defined maximum line length in the code style.
336 _idForJobScheduler.postValue(it)
337 // finally we request to go to the previous screen
338 isInProgress = false
339 sharedPreferencesRepository.removeDashboardLastUpdatedMoment() // so that once we return to the dashboard it would trigger an update
340 shouldGoBack.requestNavigation()
341 }
342 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:46:9Line detected, which is longer than the defined maximum line length in the code style.
43 */
44 class SubmissionViewModelInjector(origamiTrackerType: OrigamiTrackerType) : SubmissionViewModelAccessor {
45 override var commonViewModel: CommonViewModel = when (origamiTrackerType) {
46 OrigamiTrackerType.ALCOHOL -> AlcoholSubmissionViewModelFactory().create(AlcoholSubmissionViewModelImpl::class.java)
47 OrigamiTrackerType.BLOOD_GLUCOSE -> BloodGlucoseSubmissionViewModelFactory().create(BloodGlucoseSubmissionViewModelImpl::class.java)
48 OrigamiTrackerType.BLOOD_PRESSURE -> BloodPressureSubmissionViewModelFactory().create(BloodPressureSubmissionViewModelImpl::class.java)
49 OrigamiTrackerType.CHOLESTEROL -> CholesterolSubmissionViewModelFactory().create(CholesterolSubmissionViewModelImpl::class.java)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:47:9Line detected, which is longer than the defined maximum line length in the code style.
44 class SubmissionViewModelInjector(origamiTrackerType: OrigamiTrackerType) : SubmissionViewModelAccessor {
45 override var commonViewModel: CommonViewModel = when (origamiTrackerType) {
46 OrigamiTrackerType.ALCOHOL -> AlcoholSubmissionViewModelFactory().create(AlcoholSubmissionViewModelImpl::class.java)
47 OrigamiTrackerType.BLOOD_GLUCOSE -> BloodGlucoseSubmissionViewModelFactory().create(BloodGlucoseSubmissionViewModelImpl::class.java)
48 OrigamiTrackerType.BLOOD_PRESSURE -> BloodPressureSubmissionViewModelFactory().create(BloodPressureSubmissionViewModelImpl::class.java)
49 OrigamiTrackerType.CHOLESTEROL -> CholesterolSubmissionViewModelFactory().create(CholesterolSubmissionViewModelImpl::class.java)
50 OrigamiTrackerType.DIET -> DietSubmissionViewModelFactory().create(DietSubmissionViewModelImpl::class.java)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:48:9Line detected, which is longer than the defined maximum line length in the code style.
45 override var commonViewModel: CommonViewModel = when (origamiTrackerType) {
46 OrigamiTrackerType.ALCOHOL -> AlcoholSubmissionViewModelFactory().create(AlcoholSubmissionViewModelImpl::class.java)
47 OrigamiTrackerType.BLOOD_GLUCOSE -> BloodGlucoseSubmissionViewModelFactory().create(BloodGlucoseSubmissionViewModelImpl::class.java)
48 OrigamiTrackerType.BLOOD_PRESSURE -> BloodPressureSubmissionViewModelFactory().create(BloodPressureSubmissionViewModelImpl::class.java)
49 OrigamiTrackerType.CHOLESTEROL -> CholesterolSubmissionViewModelFactory().create(CholesterolSubmissionViewModelImpl::class.java)
50 OrigamiTrackerType.DIET -> DietSubmissionViewModelFactory().create(DietSubmissionViewModelImpl::class.java)
51 OrigamiTrackerType.FITNESS -> FitnessSubmissionViewModelFactory().create(FitnessSubmissionViewModelImpl::class.java)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:49:9Line detected, which is longer than the defined maximum line length in the code style.
46 OrigamiTrackerType.ALCOHOL -> AlcoholSubmissionViewModelFactory().create(AlcoholSubmissionViewModelImpl::class.java)
47 OrigamiTrackerType.BLOOD_GLUCOSE -> BloodGlucoseSubmissionViewModelFactory().create(BloodGlucoseSubmissionViewModelImpl::class.java)
48 OrigamiTrackerType.BLOOD_PRESSURE -> BloodPressureSubmissionViewModelFactory().create(BloodPressureSubmissionViewModelImpl::class.java)
49 OrigamiTrackerType.CHOLESTEROL -> CholesterolSubmissionViewModelFactory().create(CholesterolSubmissionViewModelImpl::class.java)
50 OrigamiTrackerType.DIET -> DietSubmissionViewModelFactory().create(DietSubmissionViewModelImpl::class.java)
51 OrigamiTrackerType.FITNESS -> FitnessSubmissionViewModelFactory().create(FitnessSubmissionViewModelImpl::class.java)
52 OrigamiTrackerType.MEDICATION_GROUP -> MedicationSubmissionViewModelFactory().create(MedicationSubmissionViewModelImpl::class.java)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:51:9Line detected, which is longer than the defined maximum line length in the code style.
48 OrigamiTrackerType.BLOOD_PRESSURE -> BloodPressureSubmissionViewModelFactory().create(BloodPressureSubmissionViewModelImpl::class.java)
49 OrigamiTrackerType.CHOLESTEROL -> CholesterolSubmissionViewModelFactory().create(CholesterolSubmissionViewModelImpl::class.java)
50 OrigamiTrackerType.DIET -> DietSubmissionViewModelFactory().create(DietSubmissionViewModelImpl::class.java)
51 OrigamiTrackerType.FITNESS -> FitnessSubmissionViewModelFactory().create(FitnessSubmissionViewModelImpl::class.java)
52 OrigamiTrackerType.MEDICATION_GROUP -> MedicationSubmissionViewModelFactory().create(MedicationSubmissionViewModelImpl::class.java)
53 OrigamiTrackerType.RELATIONSHIP -> RelationshipSubmissionViewModelFactory().create(RelationshipSubmissionViewModelImpl::class.java)
54 OrigamiTrackerType.SLEEP -> SleepSubmissionViewModelFactory().create(SleepSubmissionViewModelImpl::class.java)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:52:9Line detected, which is longer than the defined maximum line length in the code style.
49 OrigamiTrackerType.CHOLESTEROL -> CholesterolSubmissionViewModelFactory().create(CholesterolSubmissionViewModelImpl::class.java)
50 OrigamiTrackerType.DIET -> DietSubmissionViewModelFactory().create(DietSubmissionViewModelImpl::class.java)
51 OrigamiTrackerType.FITNESS -> FitnessSubmissionViewModelFactory().create(FitnessSubmissionViewModelImpl::class.java)
52 OrigamiTrackerType.MEDICATION_GROUP -> MedicationSubmissionViewModelFactory().create(MedicationSubmissionViewModelImpl::class.java)
53 OrigamiTrackerType.RELATIONSHIP -> RelationshipSubmissionViewModelFactory().create(RelationshipSubmissionViewModelImpl::class.java)
54 OrigamiTrackerType.SLEEP -> SleepSubmissionViewModelFactory().create(SleepSubmissionViewModelImpl::class.java)
55 OrigamiTrackerType.SMOKE -> SmokeSubmissionViewModelFactory().create(SmokeSubmissionViewModelImpl::class.java)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:53:9Line detected, which is longer than the defined maximum line length in the code style.
50 OrigamiTrackerType.DIET -> DietSubmissionViewModelFactory().create(DietSubmissionViewModelImpl::class.java)
51 OrigamiTrackerType.FITNESS -> FitnessSubmissionViewModelFactory().create(FitnessSubmissionViewModelImpl::class.java)
52 OrigamiTrackerType.MEDICATION_GROUP -> MedicationSubmissionViewModelFactory().create(MedicationSubmissionViewModelImpl::class.java)
53 OrigamiTrackerType.RELATIONSHIP -> RelationshipSubmissionViewModelFactory().create(RelationshipSubmissionViewModelImpl::class.java)
54 OrigamiTrackerType.SLEEP -> SleepSubmissionViewModelFactory().create(SleepSubmissionViewModelImpl::class.java)
55 OrigamiTrackerType.SMOKE -> SmokeSubmissionViewModelFactory().create(SmokeSubmissionViewModelImpl::class.java)
56 OrigamiTrackerType.STEPS -> StepsSubmissionViewModelFactory().create(StepsSubmissionViewModelImpl::class.java)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:57:9Line detected, which is longer than the defined maximum line length in the code style.
54 OrigamiTrackerType.SLEEP -> SleepSubmissionViewModelFactory().create(SleepSubmissionViewModelImpl::class.java)
55 OrigamiTrackerType.SMOKE -> SmokeSubmissionViewModelFactory().create(SmokeSubmissionViewModelImpl::class.java)
56 OrigamiTrackerType.STEPS -> StepsSubmissionViewModelFactory().create(StepsSubmissionViewModelImpl::class.java)
57 OrigamiTrackerType.STRESS -> StressSubmissionViewModelFactory().create(StressSubmissionViewModelImpl::class.java)
58 OrigamiTrackerType.WEIGHT -> WeightSubmissionViewModelFactory().create(WeightSubmissionViewModelImpl::class.java)
59 }
60
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:58:9Line detected, which is longer than the defined maximum line length in the code style.
55 OrigamiTrackerType.SMOKE -> SmokeSubmissionViewModelFactory().create(SmokeSubmissionViewModelImpl::class.java)
56 OrigamiTrackerType.STEPS -> StepsSubmissionViewModelFactory().create(StepsSubmissionViewModelImpl::class.java)
57 OrigamiTrackerType.STRESS -> StressSubmissionViewModelFactory().create(StressSubmissionViewModelImpl::class.java)
58 OrigamiTrackerType.WEIGHT -> WeightSubmissionViewModelFactory().create(WeightSubmissionViewModelImpl::class.java)
59 }
60
61 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:68:25Line detected, which is longer than the defined maximum line length in the code style.
65 override fun <T : ViewModel> create(modelClass: Class<T>): T {
66 return AlcoholSubmissionViewModelImpl(
67 TrackerMeasurementRepositoryImpl(
68 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
69 Origami.getDatabaseInstance().trackerMeasurementModel()
70
71 ),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:76:25Line detected, which is longer than the defined maximum line length in the code style.
73 Origami.sharedPreferencesForSubmission!!,
74 Origami.liveSharedPreferencesForSubmission!!),
75 TrackerRepositoryImpl(
76 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
77 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
78 Origami.getDatabaseInstance().trackerModel(),
79 Origami.getDatabaseInstance().greenDayModel(),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:77:25Line detected, which is longer than the defined maximum line length in the code style.
74 Origami.liveSharedPreferencesForSubmission!!),
75 TrackerRepositoryImpl(
76 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
77 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
78 Origami.getDatabaseInstance().trackerModel(),
79 Origami.getDatabaseInstance().greenDayModel(),
80 Origami.getDatabaseInstance().trackerHistoryModel()),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:82:25Line detected, which is longer than the defined maximum line length in the code style.
79 Origami.getDatabaseInstance().greenDayModel(),
80 Origami.getDatabaseInstance().trackerHistoryModel()),
81 GreenDayRepositoryImpl(
82 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
83 Origami.getDatabaseInstance().greenDayModel()
84 ),
85 OrigamiSharedPreferencesRepositoryImpl(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:90:25Line detected, which is longer than the defined maximum line length in the code style.
87 ),
88 LiveSharedPreferencesRepositoryImpl(Origami.liveSharedPreferences!!),
89 ConfigurationRepositoryImpl(
90 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
91 Origami.getDatabaseInstance().trackerConfigurationModel(),
92 OrigamiSharedPreferencesRepositoryImpl(Origami.sharedPreferences!!)
93 )) as T
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:102:25Line detected, which is longer than the defined maximum line length in the code style.
99 override fun <T : ViewModel> create(modelClass: Class<T>): T {
100 return BloodGlucoseSubmissionViewModelImpl(
101 TrackerMeasurementRepositoryImpl(
102 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
103 Origami.getDatabaseInstance().trackerMeasurementModel()
104
105 ),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:110:25Line detected, which is longer than the defined maximum line length in the code style.
107 Origami.sharedPreferencesForSubmission!!,
108 Origami.liveSharedPreferencesForSubmission!!),
109 TrackerRepositoryImpl(
110 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
111 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
112 Origami.getDatabaseInstance().trackerModel(),
113 Origami.getDatabaseInstance().greenDayModel(),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:111:25Line detected, which is longer than the defined maximum line length in the code style.
108 Origami.liveSharedPreferencesForSubmission!!),
109 TrackerRepositoryImpl(
110 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
111 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
112 Origami.getDatabaseInstance().trackerModel(),
113 Origami.getDatabaseInstance().greenDayModel(),
114 Origami.getDatabaseInstance().trackerHistoryModel()),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:116:25Line detected, which is longer than the defined maximum line length in the code style.
113 Origami.getDatabaseInstance().greenDayModel(),
114 Origami.getDatabaseInstance().trackerHistoryModel()),
115 GreenDayRepositoryImpl(
116 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
117 Origami.getDatabaseInstance().greenDayModel()
118 ),
119 OrigamiSharedPreferencesRepositoryImpl(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:124:25Line detected, which is longer than the defined maximum line length in the code style.
121 ),
122 LiveSharedPreferencesRepositoryImpl(Origami.liveSharedPreferences!!),
123 ConfigurationRepositoryImpl(
124 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
125 Origami.getDatabaseInstance().trackerConfigurationModel(),
126 OrigamiSharedPreferencesRepositoryImpl(Origami.sharedPreferences!!)
127 )) as T
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:136:25Line detected, which is longer than the defined maximum line length in the code style.
133 override fun <T : ViewModel> create(modelClass: Class<T>): T {
134 return BloodPressureSubmissionViewModelImpl(
135 TrackerMeasurementRepositoryImpl(
136 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
137 Origami.getDatabaseInstance().trackerMeasurementModel()
138
139 ),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:144:25Line detected, which is longer than the defined maximum line length in the code style.
141 Origami.sharedPreferencesForSubmission!!,
142 Origami.liveSharedPreferencesForSubmission!!),
143 TrackerRepositoryImpl(
144 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
145 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
146 Origami.getDatabaseInstance().trackerModel(),
147 Origami.getDatabaseInstance().greenDayModel(),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:145:25Line detected, which is longer than the defined maximum line length in the code style.
142 Origami.liveSharedPreferencesForSubmission!!),
143 TrackerRepositoryImpl(
144 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
145 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
146 Origami.getDatabaseInstance().trackerModel(),
147 Origami.getDatabaseInstance().greenDayModel(),
148 Origami.getDatabaseInstance().trackerHistoryModel()),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:150:25Line detected, which is longer than the defined maximum line length in the code style.
147 Origami.getDatabaseInstance().greenDayModel(),
148 Origami.getDatabaseInstance().trackerHistoryModel()),
149 GreenDayRepositoryImpl(
150 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
151 Origami.getDatabaseInstance().greenDayModel()
152 ),
153 OrigamiSharedPreferencesRepositoryImpl(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:158:25Line detected, which is longer than the defined maximum line length in the code style.
155 ),
156 LiveSharedPreferencesRepositoryImpl(Origami.liveSharedPreferences!!),
157 ConfigurationRepositoryImpl(
158 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
159 Origami.getDatabaseInstance().trackerConfigurationModel(),
160 OrigamiSharedPreferencesRepositoryImpl(Origami.sharedPreferences!!)
161 )) as T
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:170:25Line detected, which is longer than the defined maximum line length in the code style.
167 override fun <T : ViewModel> create(modelClass: Class<T>): T {
168 return CholesterolSubmissionViewModelImpl(
169 TrackerMeasurementRepositoryImpl(
170 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
171 Origami.getDatabaseInstance().trackerMeasurementModel()
172
173 ),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:178:25Line detected, which is longer than the defined maximum line length in the code style.
175 Origami.sharedPreferencesForSubmission!!,
176 Origami.liveSharedPreferencesForSubmission!!),
177 TrackerRepositoryImpl(
178 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
179 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
180 Origami.getDatabaseInstance().trackerModel(),
181 Origami.getDatabaseInstance().greenDayModel(),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:179:25Line detected, which is longer than the defined maximum line length in the code style.
176 Origami.liveSharedPreferencesForSubmission!!),
177 TrackerRepositoryImpl(
178 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
179 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
180 Origami.getDatabaseInstance().trackerModel(),
181 Origami.getDatabaseInstance().greenDayModel(),
182 Origami.getDatabaseInstance().trackerHistoryModel()),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:184:25Line detected, which is longer than the defined maximum line length in the code style.
181 Origami.getDatabaseInstance().greenDayModel(),
182 Origami.getDatabaseInstance().trackerHistoryModel()),
183 GreenDayRepositoryImpl(
184 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
185 Origami.getDatabaseInstance().greenDayModel()
186 ),
187 OrigamiSharedPreferencesRepositoryImpl(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:192:25Line detected, which is longer than the defined maximum line length in the code style.
189 ),
190 LiveSharedPreferencesRepositoryImpl(Origami.liveSharedPreferences!!),
191 ConfigurationRepositoryImpl(
192 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
193 Origami.getDatabaseInstance().trackerConfigurationModel(),
194 OrigamiSharedPreferencesRepositoryImpl(Origami.sharedPreferences!!)
195 )) as T
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:207:25Line detected, which is longer than the defined maximum line length in the code style.
204 Origami.sharedPreferencesForSubmission!!,
205 Origami.liveSharedPreferencesForSubmission!!),
206 TrackerRepositoryImpl(
207 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
208 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
209 Origami.getDatabaseInstance().trackerModel(),
210 Origami.getDatabaseInstance().greenDayModel(),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:208:25Line detected, which is longer than the defined maximum line length in the code style.
205 Origami.liveSharedPreferencesForSubmission!!),
206 TrackerRepositoryImpl(
207 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
208 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
209 Origami.getDatabaseInstance().trackerModel(),
210 Origami.getDatabaseInstance().greenDayModel(),
211 Origami.getDatabaseInstance().trackerHistoryModel()),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:213:25Line detected, which is longer than the defined maximum line length in the code style.
210 Origami.getDatabaseInstance().greenDayModel(),
211 Origami.getDatabaseInstance().trackerHistoryModel()),
212 GreenDayRepositoryImpl(
213 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
214 Origami.getDatabaseInstance().greenDayModel()
215 ),
216 OrigamiSharedPreferencesRepositoryImpl(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:221:25Line detected, which is longer than the defined maximum line length in the code style.
218 ),
219 LiveSharedPreferencesRepositoryImpl(Origami.liveSharedPreferences!!),
220 ConfigurationRepositoryImpl(
221 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
222 Origami.getDatabaseInstance().trackerConfigurationModel(),
223 OrigamiSharedPreferencesRepositoryImpl(Origami.sharedPreferences!!)
224 ),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:237:25Line detected, which is longer than the defined maximum line length in the code style.
234 Origami.sharedPreferencesForSubmission!!,
235 Origami.liveSharedPreferencesForSubmission!!),
236 TrackerRepositoryImpl(
237 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
238 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
239 Origami.getDatabaseInstance().trackerModel(),
240 Origami.getDatabaseInstance().greenDayModel(),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:238:25Line detected, which is longer than the defined maximum line length in the code style.
235 Origami.liveSharedPreferencesForSubmission!!),
236 TrackerRepositoryImpl(
237 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
238 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
239 Origami.getDatabaseInstance().trackerModel(),
240 Origami.getDatabaseInstance().greenDayModel(),
241 Origami.getDatabaseInstance().trackerHistoryModel()),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:243:25Line detected, which is longer than the defined maximum line length in the code style.
240 Origami.getDatabaseInstance().greenDayModel(),
241 Origami.getDatabaseInstance().trackerHistoryModel()),
242 GreenDayRepositoryImpl(
243 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
244 Origami.getDatabaseInstance().greenDayModel()
245 ),
246 OrigamiSharedPreferencesRepositoryImpl(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:251:25Line detected, which is longer than the defined maximum line length in the code style.
248 ),
249 LiveSharedPreferencesRepositoryImpl(Origami.liveSharedPreferences!!),
250 ConfigurationRepositoryImpl(
251 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
252 Origami.getDatabaseInstance().trackerConfigurationModel(),
253 OrigamiSharedPreferencesRepositoryImpl(Origami.sharedPreferences!!)
254 )) as T
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:266:25Line detected, which is longer than the defined maximum line length in the code style.
263 Origami.sharedPreferencesForSubmission!!,
264 Origami.liveSharedPreferencesForSubmission!!),
265 TrackerRepositoryImpl(
266 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
267 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
268 Origami.getDatabaseInstance().trackerModel(),
269 Origami.getDatabaseInstance().greenDayModel(),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:267:25Line detected, which is longer than the defined maximum line length in the code style.
264 Origami.liveSharedPreferencesForSubmission!!),
265 TrackerRepositoryImpl(
266 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
267 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
268 Origami.getDatabaseInstance().trackerModel(),
269 Origami.getDatabaseInstance().greenDayModel(),
270 Origami.getDatabaseInstance().trackerHistoryModel()),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:272:25Line detected, which is longer than the defined maximum line length in the code style.
269 Origami.getDatabaseInstance().greenDayModel(),
270 Origami.getDatabaseInstance().trackerHistoryModel()),
271 GreenDayRepositoryImpl(
272 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
273 Origami.getDatabaseInstance().greenDayModel()
274 ),
275 OrigamiSharedPreferencesRepositoryImpl(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:280:25Line detected, which is longer than the defined maximum line length in the code style.
277 ),
278 LiveSharedPreferencesRepositoryImpl(Origami.liveSharedPreferences!!),
279 ConfigurationRepositoryImpl(
280 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
281 Origami.getDatabaseInstance().trackerConfigurationModel(),
282 OrigamiSharedPreferencesRepositoryImpl(Origami.sharedPreferences!!)
283 )) as T
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:295:25Line detected, which is longer than the defined maximum line length in the code style.
292 Origami.sharedPreferencesForSubmission!!,
293 Origami.liveSharedPreferencesForSubmission!!),
294 TrackerRepositoryImpl(
295 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
296 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
297 Origami.getDatabaseInstance().trackerModel(),
298 Origami.getDatabaseInstance().greenDayModel(),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:296:25Line detected, which is longer than the defined maximum line length in the code style.
293 Origami.liveSharedPreferencesForSubmission!!),
294 TrackerRepositoryImpl(
295 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
296 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
297 Origami.getDatabaseInstance().trackerModel(),
298 Origami.getDatabaseInstance().greenDayModel(),
299 Origami.getDatabaseInstance().trackerHistoryModel()),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:301:25Line detected, which is longer than the defined maximum line length in the code style.
298 Origami.getDatabaseInstance().greenDayModel(),
299 Origami.getDatabaseInstance().trackerHistoryModel()),
300 GreenDayRepositoryImpl(
301 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
302 Origami.getDatabaseInstance().greenDayModel()
303 ),
304 OrigamiSharedPreferencesRepositoryImpl(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:309:25Line detected, which is longer than the defined maximum line length in the code style.
306 ),
307 LiveSharedPreferencesRepositoryImpl(Origami.liveSharedPreferences!!),
308 ConfigurationRepositoryImpl(
309 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
310 Origami.getDatabaseInstance().trackerConfigurationModel(),
311 OrigamiSharedPreferencesRepositoryImpl(Origami.sharedPreferences!!)
312 )) as T
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:321:25Line detected, which is longer than the defined maximum line length in the code style.
318 override fun <T : ViewModel> create(modelClass: Class<T>): T {
319 return SmokeSubmissionViewModelImpl(
320 TrackerMeasurementRepositoryImpl(
321 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
322 Origami.getDatabaseInstance().trackerMeasurementModel()
323
324 ),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:329:25Line detected, which is longer than the defined maximum line length in the code style.
326 Origami.sharedPreferencesForSubmission!!,
327 Origami.liveSharedPreferencesForSubmission!!),
328 TrackerRepositoryImpl(
329 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
330 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
331 Origami.getDatabaseInstance().trackerModel(),
332 Origami.getDatabaseInstance().greenDayModel(),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:330:25Line detected, which is longer than the defined maximum line length in the code style.
327 Origami.liveSharedPreferencesForSubmission!!),
328 TrackerRepositoryImpl(
329 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
330 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
331 Origami.getDatabaseInstance().trackerModel(),
332 Origami.getDatabaseInstance().greenDayModel(),
333 Origami.getDatabaseInstance().trackerHistoryModel()),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:335:25Line detected, which is longer than the defined maximum line length in the code style.
332 Origami.getDatabaseInstance().greenDayModel(),
333 Origami.getDatabaseInstance().trackerHistoryModel()),
334 GreenDayRepositoryImpl(
335 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
336 Origami.getDatabaseInstance().greenDayModel()
337 ),
338 OrigamiSharedPreferencesRepositoryImpl(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:343:25Line detected, which is longer than the defined maximum line length in the code style.
340 ),
341 LiveSharedPreferencesRepositoryImpl(Origami.liveSharedPreferences!!),
342 ConfigurationRepositoryImpl(
343 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
344 Origami.getDatabaseInstance().trackerConfigurationModel(),
345 OrigamiSharedPreferencesRepositoryImpl(Origami.sharedPreferences!!)
346 )) as T
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:355:25Line detected, which is longer than the defined maximum line length in the code style.
352 override fun <T : ViewModel> create(modelClass: Class<T>): T {
353 return StepsSubmissionViewModelImpl(
354 ManualStepsBucketRepositoryImpl(
355 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
356 Origami.getDatabaseInstance().manualStepsBucketModel()
357 ),
358 SubmissionSharedPreferencesRepositoryImpl(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:362:25Line detected, which is longer than the defined maximum line length in the code style.
359 Origami.sharedPreferencesForSubmission!!,
360 Origami.liveSharedPreferencesForSubmission!!),
361 TrackerRepositoryImpl(
362 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
363 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
364 Origami.getDatabaseInstance().trackerModel(),
365 Origami.getDatabaseInstance().greenDayModel(),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:363:25Line detected, which is longer than the defined maximum line length in the code style.
360 Origami.liveSharedPreferencesForSubmission!!),
361 TrackerRepositoryImpl(
362 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
363 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
364 Origami.getDatabaseInstance().trackerModel(),
365 Origami.getDatabaseInstance().greenDayModel(),
366 Origami.getDatabaseInstance().trackerHistoryModel()),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:368:25Line detected, which is longer than the defined maximum line length in the code style.
365 Origami.getDatabaseInstance().greenDayModel(),
366 Origami.getDatabaseInstance().trackerHistoryModel()),
367 GreenDayRepositoryImpl(
368 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
369 Origami.getDatabaseInstance().greenDayModel()
370 ),
371 OrigamiSharedPreferencesRepositoryImpl(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:376:25Line detected, which is longer than the defined maximum line length in the code style.
373 ),
374 LiveSharedPreferencesRepositoryImpl(Origami.liveSharedPreferences!!),
375 ConfigurationRepositoryImpl(
376 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
377 Origami.getDatabaseInstance().trackerConfigurationModel(),
378 OrigamiSharedPreferencesRepositoryImpl(Origami.sharedPreferences!!)
379 )) as T
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:391:25Line detected, which is longer than the defined maximum line length in the code style.
388 Origami.sharedPreferencesForSubmission!!,
389 Origami.liveSharedPreferencesForSubmission!!),
390 TrackerRepositoryImpl(
391 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
392 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
393 Origami.getDatabaseInstance().trackerModel(),
394 Origami.getDatabaseInstance().greenDayModel(),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:392:25Line detected, which is longer than the defined maximum line length in the code style.
389 Origami.liveSharedPreferencesForSubmission!!),
390 TrackerRepositoryImpl(
391 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
392 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
393 Origami.getDatabaseInstance().trackerModel(),
394 Origami.getDatabaseInstance().greenDayModel(),
395 Origami.getDatabaseInstance().trackerHistoryModel()),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:397:25Line detected, which is longer than the defined maximum line length in the code style.
394 Origami.getDatabaseInstance().greenDayModel(),
395 Origami.getDatabaseInstance().trackerHistoryModel()),
396 GreenDayRepositoryImpl(
397 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
398 Origami.getDatabaseInstance().greenDayModel()
399 ),
400 OrigamiSharedPreferencesRepositoryImpl(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:405:25Line detected, which is longer than the defined maximum line length in the code style.
402 ),
403 LiveSharedPreferencesRepositoryImpl(Origami.liveSharedPreferences!!),
404 ConfigurationRepositoryImpl(
405 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
406 Origami.getDatabaseInstance().trackerConfigurationModel(),
407 OrigamiSharedPreferencesRepositoryImpl(Origami.sharedPreferences!!)
408 )) as T
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:417:25Line detected, which is longer than the defined maximum line length in the code style.
414 override fun <T : ViewModel> create(modelClass: Class<T>): T {
415 return WeightSubmissionViewModelImpl(
416 TrackerMeasurementRepositoryImpl(
417 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
418 Origami.getDatabaseInstance().trackerMeasurementModel()
419
420 ),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:425:25Line detected, which is longer than the defined maximum line length in the code style.
422 Origami.sharedPreferencesForSubmission!!,
423 Origami.liveSharedPreferencesForSubmission!!),
424 TrackerRepositoryImpl(
425 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
426 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
427 Origami.getDatabaseInstance().trackerModel(),
428 Origami.getDatabaseInstance().greenDayModel(),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:426:25Line detected, which is longer than the defined maximum line length in the code style.
423 Origami.liveSharedPreferencesForSubmission!!),
424 TrackerRepositoryImpl(
425 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
426 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
427 Origami.getDatabaseInstance().trackerModel(),
428 Origami.getDatabaseInstance().greenDayModel(),
429 Origami.getDatabaseInstance().trackerHistoryModel()),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:431:25Line detected, which is longer than the defined maximum line length in the code style.
428 Origami.getDatabaseInstance().greenDayModel(),
429 Origami.getDatabaseInstance().trackerHistoryModel()),
430 GreenDayRepositoryImpl(
431 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
432 Origami.getDatabaseInstance().greenDayModel()
433 ),
434 OrigamiSharedPreferencesRepositoryImpl(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/CommonViewModelFactory.kt:439:25Line detected, which is longer than the defined maximum line length in the code style.
436 ),
437 LiveSharedPreferencesRepositoryImpl(Origami.liveSharedPreferences!!),
438 ConfigurationRepositoryImpl(
439 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
440 Origami.getDatabaseInstance().trackerConfigurationModel(),
441 OrigamiSharedPreferencesRepositoryImpl(Origami.sharedPreferences!!)
442 )) as T
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/model/SubmissionUiConfiguration.kt:44:10Line detected, which is longer than the defined maximum line length in the code style.
41 companion object {
42 /**
43 * Used for standalone submission fragments
44 * (ex. in standalone fragments we need a confirmation dialog (for sleep) and an info block (for steps, sleep) to be shown)
45 */
46 fun forStandaloneFragment(origamiTrackerType: OrigamiTrackerType, shouldShowUpdateLabel: Boolean) = when (origamiTrackerType) {
47 OrigamiTrackerType.ALCOHOL -> fromAlcohol()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/model/SubmissionUiConfiguration.kt:46:9Line detected, which is longer than the defined maximum line length in the code style.
43 * Used for standalone submission fragments
44 * (ex. in standalone fragments we need a confirmation dialog (for sleep) and an info block (for steps, sleep) to be shown)
45 */
46 fun forStandaloneFragment(origamiTrackerType: OrigamiTrackerType, shouldShowUpdateLabel: Boolean) = when (origamiTrackerType) {
47 OrigamiTrackerType.ALCOHOL -> fromAlcohol()
48 OrigamiTrackerType.BLOOD_GLUCOSE -> fromBloodGlucose()
49 OrigamiTrackerType.BLOOD_PRESSURE -> fromBloodPressure()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/model/SubmissionUiConfiguration.kt:66:10Line detected, which is longer than the defined maximum line length in the code style.
63
64 /**
65 * Used for gdt stack fragment
66 * (ex. in gdt stack fragments we don't need a confirmation dialog (for sleep) and an info block (for steps, sleep) to be shown)
67 */
68 fun forGdtStack(origamiTrackerType: OrigamiTrackerType) = when (origamiTrackerType) {
69 OrigamiTrackerType.ALCOHOL -> fromAlcohol()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/model/TabConfiguration.kt:15:1Line detected, which is longer than the defined maximum line length in the code style.
12 fun provideTabsToShow(): List<TrackerTab>
13 }
14
15 class SingleTabConfiguration(private val origamiTrackerType: OrigamiTrackerType?, private val isEditMode: Boolean) : TabConfiguration {
16 override fun provideTabsToShow(): List<TrackerTab> {
17 if (origamiTrackerType == null || TrackerTabId.provideByTrackerType(origamiTrackerType).size > 1) {
18 L.e(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/model/TabConfiguration.kt:93:9Line detected, which is longer than the defined maximum line length in the code style.
90 } else {
91 SubmissionButtonAction.SAVE
92 }
93 val tabs = mutableListOf(TrackerTab(TrackerTabId.DIET_MANUAL, primarySubmissionButtonAction, SubmissionButtonAction.NONE, R.string.manual))
94 if (isPassioInputEnabled && isPassioTabToShow) {
95 tabs.add(
96 TrackerTab(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/model/TabConfiguration.kt:124:13Line detected, which is longer than the defined maximum line length in the code style.
121 else -> SubmissionButtonAction.SAVE
122 }
123 val tabs = if (isVoiceTabToShow) {
124 mutableListOf(TrackerTab(TrackerTabId.STRESS_VOICE, primarySubmissionButtonAction, SubmissionButtonAction.NONE, R.string.voice))
125 } else {
126 mutableListOf(TrackerTab(TrackerTabId.STRESS_MANUAL, primarySubmissionButtonAction, SubmissionButtonAction.NONE, R.string.manual))
127 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/model/TabConfiguration.kt:126:13Line detected, which is longer than the defined maximum line length in the code style.
123 val tabs = if (isVoiceTabToShow) {
124 mutableListOf(TrackerTab(TrackerTabId.STRESS_VOICE, primarySubmissionButtonAction, SubmissionButtonAction.NONE, R.string.voice))
125 } else {
126 mutableListOf(TrackerTab(TrackerTabId.STRESS_MANUAL, primarySubmissionButtonAction, SubmissionButtonAction.NONE, R.string.manual))
127 }
128 return tabs.sortedBy { it.id.orderNumber }
129 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/tracker/AlcoholSubmissionViewModelImpl.kt:26:9Line detected, which is longer than the defined maximum line length in the code style.
23 sharedPreferencesRepository: OrigamiSharedPreferencesRepository,
24 liveSharedPreferencesRepository: LiveSharedPreferencesRepository,
25 configurationRepository: ConfigurationRepository) :
26 CommonViewModelImpl(sharedPreferencesRepository, submissionSharedPreferencesRepository, liveSharedPreferencesRepository,
27 trackerRepository, greenDayRepository, configurationRepository, OrigamiTrackerType.ALCOHOL) {
28
29 private val alcoholDrinks = submissionSharedPreferencesRepository.getAlcoholDrinksAsLiveData()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/tracker/AlcoholSubmissionViewModelImpl.kt:39:9Line detected, which is longer than the defined maximum line length in the code style.
36 * The data is valid if the input is in the range of measurements' min and max values
37 */
38 private fun isDataValid(alcoholDrinks: Int?): Boolean {
39 val measurement = trackerMeasurementRepository.getMeasurementByTypeSynchronously(TrackerMeasurement.MeasurementType.ALCOHOL)
40 return measurement != null && alcoholDrinks != null && measurement.isInRange(alcoholDrinks.toDouble())
41 }
42
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/tracker/BloodGlucoseSubmissionViewModelImpl.kt:26:9Line detected, which is longer than the defined maximum line length in the code style.
23 sharedPreferencesRepository: OrigamiSharedPreferencesRepository,
24 liveSharedPreferencesRepository: LiveSharedPreferencesRepository,
25 configurationRepository: ConfigurationRepository) :
26 CommonViewModelImpl(sharedPreferencesRepository, submissionSharedPreferencesRepository, liveSharedPreferencesRepository,
27 trackerRepository, greenDayRepository, configurationRepository, OrigamiTrackerType.BLOOD_GLUCOSE) {
28
29 private val fastingGlucose = submissionSharedPreferencesRepository.getBloodGlucoseFastingAsLiveData()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/tracker/BloodGlucoseSubmissionViewModelImpl.kt:39:9Line detected, which is longer than the defined maximum line length in the code style.
36 * The data is valid if the input is in the range of measurements' min and max values
37 */
38 private fun isDataValid(fastingGlucose: Double?): Boolean {
39 val measurement = trackerMeasurementRepository.getMeasurementByTypeSynchronously(TrackerMeasurement.MeasurementType.FASTING_GLUCOSE)
40 return measurement != null && fastingGlucose != null && measurement.isInRange(fastingGlucose)
41 }
42
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/tracker/BloodGlucoseSubmissionViewModelImpl.kt:48:9Line detected, which is longer than the defined maximum line length in the code style.
45 */
46 override fun provideTrackerMsOrNull(): Tracker? {
47 val fastingGlucose = fastingGlucose.value
48 val unit = trackerMeasurementRepository.getMeasurementByTypeSynchronously(TrackerMeasurement.MeasurementType.FASTING_GLUCOSE)?.unit
49 return when {
50 !isDataValid(fastingGlucose) -> {
51 null
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/tracker/BloodPressureSubmissionViewModelImpl.kt:27:9Line detected, which is longer than the defined maximum line length in the code style.
24 sharedPreferencesRepository: OrigamiSharedPreferencesRepository,
25 liveSharedPreferencesRepository: LiveSharedPreferencesRepository,
26 configurationRepository: ConfigurationRepository) :
27 CommonViewModelImpl(sharedPreferencesRepository, submissionSharedPreferencesRepository, liveSharedPreferencesRepository,
28 trackerRepository, greenDayRepository, configurationRepository, OrigamiTrackerType.BLOOD_PRESSURE) {
29
30 private val systolic = submissionSharedPreferencesRepository.getBloodPressureSystolicAsLiveData()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/tracker/BloodPressureSubmissionViewModelImpl.kt:41:9Line detected, which is longer than the defined maximum line length in the code style.
38 * The data is valid if both inputs are in the range of measurements' min and max values
39 */
40 private fun isDataValid(systolic: Double?, diastolic: Double?): Boolean {
41 val measurementSystolic = trackerMeasurementRepository.getMeasurementByTypeSynchronously(TrackerMeasurement.MeasurementType.SYSTOLIC)
42 val measurementDiastolic = trackerMeasurementRepository.getMeasurementByTypeSynchronously(TrackerMeasurement.MeasurementType.DIASTOLIC)
43 return measurementSystolic != null && measurementDiastolic != null &&
44 systolic != null && diastolic != null &&
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/tracker/BloodPressureSubmissionViewModelImpl.kt:42:9Line detected, which is longer than the defined maximum line length in the code style.
39 */
40 private fun isDataValid(systolic: Double?, diastolic: Double?): Boolean {
41 val measurementSystolic = trackerMeasurementRepository.getMeasurementByTypeSynchronously(TrackerMeasurement.MeasurementType.SYSTOLIC)
42 val measurementDiastolic = trackerMeasurementRepository.getMeasurementByTypeSynchronously(TrackerMeasurement.MeasurementType.DIASTOLIC)
43 return measurementSystolic != null && measurementDiastolic != null &&
44 systolic != null && diastolic != null &&
45 measurementSystolic.isInRange(systolic) && measurementDiastolic.isInRange(diastolic)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/tracker/BloodPressureSubmissionViewModelImpl.kt:54:9Line detected, which is longer than the defined maximum line length in the code style.
51 override fun provideTrackerMsOrNull(): Tracker? {
52 val systolic = systolic.value
53 val diastolic = diastolic.value
54 val unitSystolic = trackerMeasurementRepository.getMeasurementByTypeSynchronously(TrackerMeasurement.MeasurementType.SYSTOLIC)?.unit
55 val unitDiastolic = trackerMeasurementRepository.getMeasurementByTypeSynchronously(TrackerMeasurement.MeasurementType.DIASTOLIC)?.unit
56
57 return when {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/tracker/BloodPressureSubmissionViewModelImpl.kt:55:9Line detected, which is longer than the defined maximum line length in the code style.
52 val systolic = systolic.value
53 val diastolic = diastolic.value
54 val unitSystolic = trackerMeasurementRepository.getMeasurementByTypeSynchronously(TrackerMeasurement.MeasurementType.SYSTOLIC)?.unit
55 val unitDiastolic = trackerMeasurementRepository.getMeasurementByTypeSynchronously(TrackerMeasurement.MeasurementType.DIASTOLIC)?.unit
56
57 return when {
58 !isDataValid(systolic, diastolic) -> {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/tracker/CholesterolSubmissionViewModelImpl.kt:26:9Line detected, which is longer than the defined maximum line length in the code style.
23 sharedPreferencesRepository: OrigamiSharedPreferencesRepository,
24 liveSharedPreferencesRepository: LiveSharedPreferencesRepository,
25 configurationRepository: ConfigurationRepository) :
26 CommonViewModelImpl(sharedPreferencesRepository, submissionSharedPreferencesRepository, liveSharedPreferencesRepository,
27 trackerRepository, greenDayRepository, configurationRepository, OrigamiTrackerType.CHOLESTEROL) {
28
29 private val totalCholesterol = submissionSharedPreferencesRepository.getCholesterolTotalAsLiveData()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/tracker/CholesterolSubmissionViewModelImpl.kt:39:9Line detected, which is longer than the defined maximum line length in the code style.
36 * The data is valid if the input is in the range of measurements' min and max values
37 */
38 private fun isDataValid(totalCholesterol: Double?): Boolean {
39 val measurement = trackerMeasurementRepository.getMeasurementByTypeSynchronously(TrackerMeasurement.MeasurementType.TOTAL_CHOLESTEROL)
40 return measurement != null && totalCholesterol != null && measurement.isInRange(totalCholesterol)
41 }
42
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/tracker/CholesterolSubmissionViewModelImpl.kt:48:9Line detected, which is longer than the defined maximum line length in the code style.
45 */
46 override fun provideTrackerMsOrNull(): Tracker? {
47 val totalCholesterol = totalCholesterol.value
48 val unit = trackerMeasurementRepository.getMeasurementByTypeSynchronously(TrackerMeasurement.MeasurementType.TOTAL_CHOLESTEROL)?.unit
49 return when {
50 !isDataValid(totalCholesterol) -> {
51 null
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/tracker/DietSubmissionViewModelImpl.kt:36:9Line detected, which is longer than the defined maximum line length in the code style.
33 configurationRepository: ConfigurationRepository,
34 private val appConfiguration: AppConfiguration,
35 ) :
36 CommonViewModelImpl(sharedPreferencesRepository, submissionSharedPreferencesRepository, liveSharedPreferencesRepository,
37 trackerRepository, greenDayRepository, configurationRepository, OrigamiTrackerType.DIET) {
38
39 private val dietLevel = submissionSharedPreferencesRepository.getDietLevelAsLiveData()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/tracker/FitnessSubmissionViewModelImpl.kt:24:9Line detected, which is longer than the defined maximum line length in the code style.
21 sharedPreferencesRepository: OrigamiSharedPreferencesRepository,
22 liveSharedPreferencesRepository: LiveSharedPreferencesRepository,
23 configurationRepository: ConfigurationRepository) :
24 CommonViewModelImpl(sharedPreferencesRepository, submissionSharedPreferencesRepository, liveSharedPreferencesRepository,
25 trackerRepository, greenDayRepository, configurationRepository, OrigamiTrackerType.FITNESS) {
26
27 private val fitnessLevel = submissionSharedPreferencesRepository.getFitnessLevelAsLiveData()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/tracker/RelationshipSubmissionViewModelImpl.kt:28:9Line detected, which is longer than the defined maximum line length in the code style.
25 liveSharedPreferencesRepository: LiveSharedPreferencesRepository,
26 configurationRepository: ConfigurationRepository,
27 ) :
28 CommonViewModelImpl(sharedPreferencesRepository, submissionSharedPreferencesRepository, liveSharedPreferencesRepository,
29 trackerRepository, greenDayRepository, configurationRepository, OrigamiTrackerType.RELATIONSHIP) {
30
31 private val relationshipLevel = submissionSharedPreferencesRepository.getRelationshipLevelAsLiveData()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/tracker/SleepSubmissionViewModelImpl.kt:34:9Line detected, which is longer than the defined maximum line length in the code style.
31 liveSharedPreferencesRepository: LiveSharedPreferencesRepository,
32 configurationRepository: ConfigurationRepository,
33 ) :
34 CommonViewModelImpl(sharedPreferencesRepository, submissionSharedPreferencesRepository, liveSharedPreferencesRepository,
35 trackerRepository, greenDayRepository, configurationRepository, OrigamiTrackerType.SLEEP) {
36
37 private val confirmationDescriptionContainer = ConfirmationDescriptionContainer()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/tracker/SleepSubmissionViewModelImpl.kt:67:5Line detected, which is longer than the defined maximum line length in the code style.
64 /**
65 * The data is valid if the bed and rise time values do not generate any errors
66 */
67 private fun isDataValid(bedTime: DateTime?, riseTime: DateTime?): Boolean = getValidationErrors(bedTime, riseTime).isEmpty()
68
69 /**
70 * Sleep tracker belongs to the Tracker Micro Service, so we provide a Tracker instance
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/tracker/SleepSubmissionViewModelImpl.kt:122:9Line detected, which is longer than the defined maximum line length in the code style.
119 * Otherwise it will be saved with no prompt.
120 */
121 override fun saveTrackerWithConfirmationIfAny() {
122 if (isSuspiciousRange(bedTime.value, riseTime.value) && !submissionSharedPreferencesRepository.getSleepNoSleepFlagIsSet()) {
123 shouldShowConfirmation.requestNavigationWith(confirmationDescriptionContainer)
124 } else {
125 super.saveTracker()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/tracker/SleepSubmissionViewModelImpl.kt:146:5Line detected, which is longer than the defined maximum line length in the code style.
143
144 private fun isInitialized(bedTime: DateTime?, riseTime: DateTime?): Boolean = bedTime != null && riseTime != null
145
146 private fun isBedBeforeRise(bedTime: DateTime?, riseTime: DateTime?): Boolean = isInitialized(bedTime, riseTime) && bedTime!!.isBefore(riseTime)
147
148 private fun isDateBeforeNow(bedTime: DateTime?, riseTime: DateTime?): Boolean = isInitialized(bedTime, riseTime) &&
149 bedTime!!.isBeforeNow && riseTime!!.isBeforeNow
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/tracker/SleepSubmissionViewModelImpl.kt:154:5Line detected, which is longer than the defined maximum line length in the code style.
151 /**
152 * Checks if the sleep range is too short or two long
153 */
154 private fun isSuspiciousRange(bedTime: DateTime?, riseTime: DateTime?): Boolean = if (isInitialized(bedTime, riseTime)) {
155 val shortestInterval = Interval(bedTime, bedTime!!.plusHours(3))
156 val longestInterval = Interval(bedTime, bedTime.plusHours(12))
157
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/tracker/SmokeSubmissionViewModelImpl.kt:26:9Line detected, which is longer than the defined maximum line length in the code style.
23 sharedPreferencesRepository: OrigamiSharedPreferencesRepository,
24 liveSharedPreferencesRepository: LiveSharedPreferencesRepository,
25 configurationRepository: ConfigurationRepository) :
26 CommonViewModelImpl(sharedPreferencesRepository, submissionSharedPreferencesRepository, liveSharedPreferencesRepository,
27 trackerRepository, greenDayRepository, configurationRepository, OrigamiTrackerType.SMOKE) {
28
29 private val smokeCigarettes = submissionSharedPreferencesRepository.getSmokeCigarettesAsLiveData()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/tracker/SmokeSubmissionViewModelImpl.kt:39:9Line detected, which is longer than the defined maximum line length in the code style.
36 * The data is valid if the input is in the range of measurements' min and max values
37 */
38 private fun isDataValid(smokeCigarettes: Int?): Boolean {
39 val measurement = trackerMeasurementRepository.getMeasurementByTypeSynchronously(TrackerMeasurement.MeasurementType.SMOKE)
40 return measurement != null && smokeCigarettes != null && measurement.isInRange(smokeCigarettes.toDouble())
41 }
42
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/tracker/StepsSubmissionViewModelImpl.kt:23:9Line detected, which is longer than the defined maximum line length in the code style.
20 sharedPreferencesRepository: OrigamiSharedPreferencesRepository,
21 liveSharedPreferencesRepository: LiveSharedPreferencesRepository,
22 configurationRepository: ConfigurationRepository) :
23 CommonViewModelImpl(sharedPreferencesRepository, submissionSharedPreferencesRepository, liveSharedPreferencesRepository,
24 trackerRepository, greenDayRepository, configurationRepository, OrigamiTrackerType.STEPS) {
25
26 /**
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/tracker/StepsSubmissionViewModelImpl.kt:36:9Line detected, which is longer than the defined maximum line length in the code style.
33 * steps bucket and put it into the database and then call the background job to sync the steps
34 */
35 override fun saveTracker() {
36 manualStepsBucketRepository.createOrUpdateBucket(submissionSharedPreferencesRepository.getStepsCount(), isEditMode(),
37 provideExtIdOrUUID(), _selectedDate.value!!)
38 shouldSyncSteps.requestNavigation()
39 sharedPreferencesRepository.removeDashboardLastUpdatedMoment() // so that once we return to the dashboard it would trigger an update
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/tracker/StepsSubmissionViewModelImpl.kt:39:9Line detected, which is longer than the defined maximum line length in the code style.
36 manualStepsBucketRepository.createOrUpdateBucket(submissionSharedPreferencesRepository.getStepsCount(), isEditMode(),
37 provideExtIdOrUUID(), _selectedDate.value!!)
38 shouldSyncSteps.requestNavigation()
39 sharedPreferencesRepository.removeDashboardLastUpdatedMoment() // so that once we return to the dashboard it would trigger an update
40 shouldGoBack.requestNavigation()
41
42 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/tracker/WeightSubmissionViewModelImpl.kt:26:9Line detected, which is longer than the defined maximum line length in the code style.
23 sharedPreferencesRepository: OrigamiSharedPreferencesRepository,
24 liveSharedPreferencesRepository: LiveSharedPreferencesRepository,
25 configurationRepository: ConfigurationRepository) :
26 CommonViewModelImpl(sharedPreferencesRepository, submissionSharedPreferencesRepository, liveSharedPreferencesRepository,
27 trackerRepository, greenDayRepository, configurationRepository, OrigamiTrackerType.WEIGHT) {
28
29 private val weight = submissionSharedPreferencesRepository.getWeightAsLiveData()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/tracker/WeightSubmissionViewModelImpl.kt:39:9Line detected, which is longer than the defined maximum line length in the code style.
36 * The data is valid if the input is in the range of measurements' min and max values
37 */
38 private fun isDataValid(weight: Int?): Boolean {
39 val measurement = trackerMeasurementRepository.getMeasurementByTypeSynchronously(TrackerMeasurement.MeasurementType.WEIGHT)
40 return measurement != null && weight != null && measurement.isInRange(weight.toDouble())
41 }
42
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/common/tracker/WeightSubmissionViewModelImpl.kt:48:9Line detected, which is longer than the defined maximum line length in the code style.
45 */
46 override fun provideTrackerMsOrNull(): Tracker? {
47 val weight = weight.value
48 val unit = trackerMeasurementRepository.getMeasurementByTypeSynchronously(TrackerMeasurement.MeasurementType.WEIGHT)?.unit
49 return when {
50 !isDataValid(weight) -> {
51 null
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/cameramessage/CameraMessageHolder.kt:12:1Line detected, which is longer than the defined maximum line length in the code style.
9 import com.sharecare.realgreen.origami.model.TrackerMeasurement
10 import com.sharecare.realgreen.origami.presentation.submission.component.SubmissionComponent
11
12 class CameraMessageHolder(context: Context, attrs: AttributeSet?) : ConstraintLayout(context, attrs), SubmissionComponent {
13
14 private val binding: ViewSubmissionComponentCameraMessageBinding =
15 ViewSubmissionComponentCameraMessageBinding.inflate(LayoutInflater.from(context), this, true)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/datetimepicker/OrigamiDateTimePicker.kt:77:9Line detected, which is longer than the defined maximum line length in the code style.
74 private fun onDatePickerClick(listener: (dateTime: DateTime) -> Unit,
75 dateTime: DateTime,
76 title: String) {
77 // we have to do +1 or -1 for the months because some instances start counting months with 0 and some start counting with 1
78 val dateDialog = TofuDatePickerDialog.newInstance(DatePickerDialog.OnDateSetListener { _, year, month, day ->
79 val correctedDate = DateTime(year, month + 1, day,
80 dateTime.hourOfDay, dateTime.minuteOfHour, 0)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/datetimepicker/OrigamiDateTimePicker.kt:94:9Line detected, which is longer than the defined maximum line length in the code style.
91 private fun onTimePickerClick(listener: (dateTime: DateTime) -> Unit,
92 dateTime: DateTime,
93 title: String) {
94 val timeDialog = TofuTimePickerDialog.newInstance(TimePickerDialog.OnTimeSetListener { _, hourOfDay, minuteOfHour, _ ->
95 val correctedDate = DateTime(dateTime.year, dateTime.monthOfYear,
96 dateTime.dayOfMonth, hourOfDay, minuteOfHour)
97 listener.invoke(correctedDate)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/datetimepicker/OrigamiDateTimePickerViewModel.kt:66:1Line detected, which is longer than the defined maximum line length in the code style.
63 fun initWithDateTime(dateTime: DateTime)
64 }
65
66 class OrigamiDateTimePickerViewModelImpl(private val submissionSharedPreferencesRepository: SubmissionSharedPreferencesRepository) : ViewModel(), OrigamiDateTimePickerViewModel {
67
68 private var submissionMeasurementType: TrackerMeasurement.SubmissionMeasurementType? = null
69
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/datetimepicker/OrigamiDateTimePickerViewModel.kt:80:17Line detected, which is longer than the defined maximum line length in the code style.
77 defaultValue.value = DateTime(submissionSharedPreferencesRepository.getSleepRiseTime())
78 }
79 else -> {
80 L.e(OrigamiDropdown::class.java.name, "Component is unsupported by the measurementType ${this.submissionMeasurementType}")
81 }
82 }
83 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/datetimepicker/OrigamiDateTimePickerViewModel.kt:96:21Line detected, which is longer than the defined maximum line length in the code style.
93 setSleepRiseTime(value.millis)
94 }
95 else -> {
96 L.i(OrigamiTextView::class.java.name, "Component is unsupported by the measurementType $submissionMeasurementType")
97 }
98 }
99 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/datetimepicker/OrigamiDateTimePickerViewModelFactory.kt:31:5Line detected, which is longer than the defined maximum line length in the code style.
28 * Use this approach instead of creating the ViewModels directly inside the views
29 */
30 class OrigamiDateTimePickerViewModelInjector : OrigamiDateTimePickerViewModelAccessor {
31 override var viewModel: OrigamiDateTimePickerViewModel = OrigamiDateTimePickerViewModelFactory().create(OrigamiDateTimePickerViewModelImpl::class.java)
32 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/datetimepicker/model/DateTimePickerUiConfiguration.kt:32:9Line detected, which is longer than the defined maximum line length in the code style.
29 */
30 val intervalMinutes: Int) {
31 companion object {
32 fun fromSubmissionMeasurementTypeOrNull(submissionMeasurementType: TrackerMeasurement.SubmissionMeasurementType?) =
33 when (submissionMeasurementType) {
34 TrackerMeasurement.SubmissionMeasurementType.SLEEP_BED_TIME -> fromSleepBedTime()
35 TrackerMeasurement.SubmissionMeasurementType.SLEEP_RISE_TIME -> fromSleepRiseTime()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/description/OrigamiDescriptionViewModel.kt:55:17Line detected, which is longer than the defined maximum line length in the code style.
52 }
53 }
54 else -> {
55 L.e(OrigamiDescription::class.java.name, "Component is unsupported by the measurementType $submissionMeasurementType")
56 }
57 }
58 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/description/OrigamiDescriptionViewModelFactory.kt:23:25Line detected, which is longer than the defined maximum line length in the code style.
20 Origami.sharedPreferencesForSubmission!!,
21 Origami.liveSharedPreferencesForSubmission!!),
22 VoiceRepositoryImpl(
23 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
24 Origami.getDatabaseInstance().voiceModel()
25 )) as T
26 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/description/OrigamiDescriptionViewModelFactory.kt:38:5Line detected, which is longer than the defined maximum line length in the code style.
35 * Use this approach instead of creating the ViewModels directly inside the views
36 */
37 class OrigamiDescriptionViewModelInjector : OrigamiDescriptionViewModelAccessor {
38 override var viewModel: OrigamiDescriptionViewModel = OrigamiDescriptionViewModelFactory().create(OrigamiDescriptionViewModelImpl::class.java)
39 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/dropdown/OrigamiDropdownViewModel.kt:49:1Line detected, which is longer than the defined maximum line length in the code style.
46 fun updateValue(value: String, tag: String? = null)
47 }
48
49 class OrigamiDropdownViewModelImpl(private val submissionSharedPreferencesRepository: SubmissionSharedPreferencesRepository,
50 private val trackerMeasurementRepository: TrackerMeasurementRepository) : ViewModel(), OrigamiDropdownViewModel {
51
52 private var submissionMeasurementType: TrackerMeasurement.SubmissionMeasurementType? = null
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/dropdown/OrigamiDropdownViewModel.kt:50:36Line detected, which is longer than the defined maximum line length in the code style.
47 }
48
49 class OrigamiDropdownViewModelImpl(private val submissionSharedPreferencesRepository: SubmissionSharedPreferencesRepository,
50 private val trackerMeasurementRepository: TrackerMeasurementRepository) : ViewModel(), OrigamiDropdownViewModel {
51
52 private var submissionMeasurementType: TrackerMeasurement.SubmissionMeasurementType? = null
53 private var _hintContainer: MutableLiveData<DropdownHintContainer> = MutableLiveData()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/dropdown/OrigamiDropdownViewModel.kt:73:17Line detected, which is longer than the defined maximum line length in the code style.
70 // we initialize the dropdown depending on the submission type
71 when (this.submissionMeasurementType) {
72 TrackerMeasurement.SubmissionMeasurementType.ALCOHOL_DRINKS -> {
73 initForNumeric(TrackerMeasurement.MeasurementType.ALCOHOL, submissionSharedPreferencesRepository.getAlcoholDrinks())
74 }
75 TrackerMeasurement.SubmissionMeasurementType.SMOKE_CIGARETTES -> {
76 initForNumeric(TrackerMeasurement.MeasurementType.SMOKE, submissionSharedPreferencesRepository.getSmokeCigarettes())
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/dropdown/OrigamiDropdownViewModel.kt:76:17Line detected, which is longer than the defined maximum line length in the code style.
73 initForNumeric(TrackerMeasurement.MeasurementType.ALCOHOL, submissionSharedPreferencesRepository.getAlcoholDrinks())
74 }
75 TrackerMeasurement.SubmissionMeasurementType.SMOKE_CIGARETTES -> {
76 initForNumeric(TrackerMeasurement.MeasurementType.SMOKE, submissionSharedPreferencesRepository.getSmokeCigarettes())
77 }
78 TrackerMeasurement.SubmissionMeasurementType.MEDICATION -> {
79 initForMedication(submissionSharedPreferencesRepository.getMedicationIntake(tag))
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/dropdown/OrigamiDropdownViewModel.kt:82:17Line detected, which is longer than the defined maximum line length in the code style.
79 initForMedication(submissionSharedPreferencesRepository.getMedicationIntake(tag))
80 }
81 else -> {
82 L.e(OrigamiDropdown::class.java.name, "Component is unsupported by the measurementType ${this.submissionMeasurementType}")
83 }
84 }
85 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/dropdown/OrigamiDropdownViewModel.kt:112:21Line detected, which is longer than the defined maximum line length in the code style.
109 }
110 }
111 else -> {
112 L.i(OrigamiDropdown::class.java.name, "Component is unsupported by the measurementType $submissionMeasurementType")
113 }
114 }
115 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/dropdown/OrigamiDropdownViewModelFactory.kt:23:25Line detected, which is longer than the defined maximum line length in the code style.
20 Origami.sharedPreferencesForSubmission!!,
21 Origami.liveSharedPreferencesForSubmission!!),
22 TrackerMeasurementRepositoryImpl(
23 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
24 Origami.getDatabaseInstance().trackerMeasurementModel()
25
26 )) as T
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/dropdown/OrigamiDropdownViewModelFactory.kt:39:5Line detected, which is longer than the defined maximum line length in the code style.
36 * Use this approach instead of creating the ViewModels directly inside the views
37 */
38 class OrigamiDropdownViewModelInjector : OrigamiDropdownViewModelAccessor {
39 override var viewModel: OrigamiDropdownViewModel = OrigamiDropdownViewModelFactory().create(OrigamiDropdownViewModelImpl::class.java)
40 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/error/OrigamiErrorValidationViewModel.kt:13:2Line detected, which is longer than the defined maximum line length in the code style.
10
11 /**
12 * A ViewModel for the error validation of the submission components
13 * To developer: if your submission component needs error handling – add this view model to it's class (see OrigamiTextView for an example)
14 */
15 interface OrigamiErrorValidationViewModel {
16
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/error/OrigamiErrorValidationViewModel.kt:58:6Line detected, which is longer than the defined maximum line length in the code style.
55 fun provideErrorText(): String
56
57 /**
58 * Provides the text to be shown in case of a normal input (usually duplicates the error text but can be empty for STEPS)
59 */
60 fun provideCleanText() : String
61
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/error/OrigamiErrorValidationViewModel.kt:64:1Line detected, which is longer than the defined maximum line length in the code style.
61
62 }
63
64 class OrigamiErrorValidationViewModelImpl(private val submissionSharedPreferencesRepository: SubmissionSharedPreferencesRepository,
65 private val trackerMeasurementRepository: TrackerMeasurementRepository
66 ) : ViewModel(), OrigamiErrorValidationViewModel {
67 private var submissionMeasurementType: TrackerMeasurement.SubmissionMeasurementType? = null
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/error/OrigamiErrorValidationViewModel.kt:101:13Line detected, which is longer than the defined maximum line length in the code style.
98 override fun initWithType(submissionMeasurementType: TrackerMeasurement.SubmissionMeasurementType) {
99 this.submissionMeasurementType = submissionMeasurementType
100 val measurementType: TrackerMeasurement.MeasurementType? = when (this.submissionMeasurementType) {
101 TrackerMeasurement.SubmissionMeasurementType.BLOOD_GLUCOSE_FASTING -> TrackerMeasurement.MeasurementType.FASTING_GLUCOSE
102 TrackerMeasurement.SubmissionMeasurementType.BLOOD_PRESSURE_SYSTOLIC -> TrackerMeasurement.MeasurementType.SYSTOLIC
103 TrackerMeasurement.SubmissionMeasurementType.BLOOD_PRESSURE_DIASTOLIC -> TrackerMeasurement.MeasurementType.DIASTOLIC
104 TrackerMeasurement.SubmissionMeasurementType.CHOLESTEROL_TOTAL -> TrackerMeasurement.MeasurementType.TOTAL_CHOLESTEROL
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/error/OrigamiErrorValidationViewModel.kt:102:13Line detected, which is longer than the defined maximum line length in the code style.
99 this.submissionMeasurementType = submissionMeasurementType
100 val measurementType: TrackerMeasurement.MeasurementType? = when (this.submissionMeasurementType) {
101 TrackerMeasurement.SubmissionMeasurementType.BLOOD_GLUCOSE_FASTING -> TrackerMeasurement.MeasurementType.FASTING_GLUCOSE
102 TrackerMeasurement.SubmissionMeasurementType.BLOOD_PRESSURE_SYSTOLIC -> TrackerMeasurement.MeasurementType.SYSTOLIC
103 TrackerMeasurement.SubmissionMeasurementType.BLOOD_PRESSURE_DIASTOLIC -> TrackerMeasurement.MeasurementType.DIASTOLIC
104 TrackerMeasurement.SubmissionMeasurementType.CHOLESTEROL_TOTAL -> TrackerMeasurement.MeasurementType.TOTAL_CHOLESTEROL
105 TrackerMeasurement.SubmissionMeasurementType.STEPS_COUNT -> TrackerMeasurement.MeasurementType.STEPS
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/error/OrigamiErrorValidationViewModel.kt:103:13Line detected, which is longer than the defined maximum line length in the code style.
100 val measurementType: TrackerMeasurement.MeasurementType? = when (this.submissionMeasurementType) {
101 TrackerMeasurement.SubmissionMeasurementType.BLOOD_GLUCOSE_FASTING -> TrackerMeasurement.MeasurementType.FASTING_GLUCOSE
102 TrackerMeasurement.SubmissionMeasurementType.BLOOD_PRESSURE_SYSTOLIC -> TrackerMeasurement.MeasurementType.SYSTOLIC
103 TrackerMeasurement.SubmissionMeasurementType.BLOOD_PRESSURE_DIASTOLIC -> TrackerMeasurement.MeasurementType.DIASTOLIC
104 TrackerMeasurement.SubmissionMeasurementType.CHOLESTEROL_TOTAL -> TrackerMeasurement.MeasurementType.TOTAL_CHOLESTEROL
105 TrackerMeasurement.SubmissionMeasurementType.STEPS_COUNT -> TrackerMeasurement.MeasurementType.STEPS
106 TrackerMeasurement.SubmissionMeasurementType.WEIGHT -> TrackerMeasurement.MeasurementType.WEIGHT
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/error/OrigamiErrorValidationViewModel.kt:104:13Line detected, which is longer than the defined maximum line length in the code style.
101 TrackerMeasurement.SubmissionMeasurementType.BLOOD_GLUCOSE_FASTING -> TrackerMeasurement.MeasurementType.FASTING_GLUCOSE
102 TrackerMeasurement.SubmissionMeasurementType.BLOOD_PRESSURE_SYSTOLIC -> TrackerMeasurement.MeasurementType.SYSTOLIC
103 TrackerMeasurement.SubmissionMeasurementType.BLOOD_PRESSURE_DIASTOLIC -> TrackerMeasurement.MeasurementType.DIASTOLIC
104 TrackerMeasurement.SubmissionMeasurementType.CHOLESTEROL_TOTAL -> TrackerMeasurement.MeasurementType.TOTAL_CHOLESTEROL
105 TrackerMeasurement.SubmissionMeasurementType.STEPS_COUNT -> TrackerMeasurement.MeasurementType.STEPS
106 TrackerMeasurement.SubmissionMeasurementType.WEIGHT -> TrackerMeasurement.MeasurementType.WEIGHT
107 TrackerMeasurement.SubmissionMeasurementType.ALCOHOL_DRINKS -> TrackerMeasurement.MeasurementType.ALCOHOL
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/error/OrigamiErrorValidationViewModel.kt:108:13Line detected, which is longer than the defined maximum line length in the code style.
105 TrackerMeasurement.SubmissionMeasurementType.STEPS_COUNT -> TrackerMeasurement.MeasurementType.STEPS
106 TrackerMeasurement.SubmissionMeasurementType.WEIGHT -> TrackerMeasurement.MeasurementType.WEIGHT
107 TrackerMeasurement.SubmissionMeasurementType.ALCOHOL_DRINKS -> TrackerMeasurement.MeasurementType.ALCOHOL
108 TrackerMeasurement.SubmissionMeasurementType.RELATIONSHIP_LEVEL -> TrackerMeasurement.MeasurementType.RELATIONSHIP
109 TrackerMeasurement.SubmissionMeasurementType.SMOKE_CIGARETTES -> TrackerMeasurement.MeasurementType.SMOKE
110 else -> {
111 L.e(OrigamiTextView::class.java.name, "Component is unsupported by the measurementType ${this.submissionMeasurementType}")
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/error/OrigamiErrorValidationViewModel.kt:111:17Line detected, which is longer than the defined maximum line length in the code style.
108 TrackerMeasurement.SubmissionMeasurementType.RELATIONSHIP_LEVEL -> TrackerMeasurement.MeasurementType.RELATIONSHIP
109 TrackerMeasurement.SubmissionMeasurementType.SMOKE_CIGARETTES -> TrackerMeasurement.MeasurementType.SMOKE
110 else -> {
111 L.e(OrigamiTextView::class.java.name, "Component is unsupported by the measurementType ${this.submissionMeasurementType}")
112 null
113 }
114 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/error/OrigamiErrorValidationViewModelFactory.kt:14:2Line detected, which is longer than the defined maximum line length in the code style.
11
12 /**
13 * A factory to provide a ViewModel for the error validation of the submission components
14 * To developer: if your submission component needs error handling – add this view model to it's class (see OrigamiTextView for an example)
15 */
16 class OrigamiErrorValidationViewModelFactory : ViewModelProvider.Factory {
17 @Suppress("UNCHECKED_CAST")
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/error/OrigamiErrorValidationViewModelFactory.kt:41:5Line detected, which is longer than the defined maximum line length in the code style.
38 * Use this approach instead of creating the ViewModels directly inside the views
39 */
40 class OrigamiErrorValidationViewModelInjector : OrigamiErrorValidationViewModelAccessor {
41 override var errorValidationViewModel: OrigamiErrorValidationViewModel = OrigamiErrorValidationViewModelFactory().create(OrigamiErrorValidationViewModelImpl::class.java)
42 }
43
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/negativebutton/OrigamiNegativeButtonViewModel.kt:40:1Line detected, which is longer than the defined maximum line length in the code style.
37 fun initWithType(submissionMeasurementType: TrackerMeasurement.SubmissionMeasurementType)
38 }
39
40 class OrigamiNegativeButtonViewModelImpl(private val submissionSharedPreferencesRepository: SubmissionSharedPreferencesRepository) : ViewModel(), OrigamiNegativeButtonViewModel {
41
42 private var submissionMeasurementType: TrackerMeasurement.SubmissionMeasurementType? = null
43 private var defaultValue: MutableLiveData<Boolean> = MutableLiveData()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/negativebutton/OrigamiNegativeButtonViewModel.kt:46:5Line detected, which is longer than the defined maximum line length in the code style.
43 private var defaultValue: MutableLiveData<Boolean> = MutableLiveData()
44 override val shouldShowConfirmationDialog: NavigationLiveData = NavigationLiveData()
45
46 override val isButtonVisible: LivePreference<Boolean> = submissionSharedPreferencesRepository.getSleepNoSleepFlagToShowAsLiveData()
47
48 override fun initWithType(submissionMeasurementType: TrackerMeasurement.SubmissionMeasurementType) {
49 this.submissionMeasurementType = submissionMeasurementType
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/negativebutton/OrigamiNegativeButtonViewModel.kt:57:17Line detected, which is longer than the defined maximum line length in the code style.
54 }
55 }
56 else -> {
57 L.e(OrigamiDropdown::class.java.name, "Component is unsupported by the measurementType ${this.submissionMeasurementType}")
58 }
59 }
60 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/negativebutton/OrigamiNegativeButtonViewModel.kt:69:21Line detected, which is longer than the defined maximum line length in the code style.
66 setSleepNoSleepFlagIsSet(value)
67 }
68 else -> {
69 L.i(OrigamiDropdown::class.java.name, "Component is unsupported by the measurementType $submissionMeasurementType")
70 }
71 }
72 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/negativebutton/OrigamiNegativeButtonViewModelFactory.kt:30:5Line detected, which is longer than the defined maximum line length in the code style.
27 * Use this approach instead of creating the ViewModels directly inside the views
28 */
29 class OrigamiNegativeButtonViewModelInjector : OrigamiNegativeButtonViewModelAccessor {
30 override var viewModel: OrigamiNegativeButtonViewModel = OrigamiNegativeButtonViewModelFactory().create(OrigamiNegativeButtonViewModelImpl::class.java)
31 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/negativebutton/model/NegativeButtonUiConfiguration.kt:31:9Line detected, which is longer than the defined maximum line length in the code style.
28 */
29 val negativeButtonRes: Int) {
30 companion object {
31 fun fromSubmissionMeasurementTypeOrNull(submissionMeasurementType: TrackerMeasurement.SubmissionMeasurementType?) =
32 when (submissionMeasurementType) {
33 TrackerMeasurement.SubmissionMeasurementType.SLEEP_NO_SLEEP_FLAG_TO_SHOW -> fromNoSleepFlag()
34 else -> null
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/radioimage/OrigamiRadioImageSelector.kt:16:9Line detected, which is longer than the defined maximum line length in the code style.
13 * Horizontal image buttons that behave as a radio component
14 */
15 class OrigamiRadioImageSelector(context: Context, attrs: AttributeSet?) : RelativeLayout(context, attrs),
16 OrigamiRadioImageSelectorViewModelAccessor by OrigamiRadioImageSelectorViewModelInjector(), SubmissionComponent {
17
18 private val binding: ViewSubmissionComponentRadioImageSelectorBinding =
19 ViewSubmissionComponentRadioImageSelectorBinding.inflate(LayoutInflater.from(context), this, true)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/radioimage/OrigamiRadioImageSelectorViewModel.kt:36:1Line detected, which is longer than the defined maximum line length in the code style.
33 fun initWithType(submissionMeasurementType: TrackerMeasurement.SubmissionMeasurementType)
34 }
35
36 class OrigamiRadioImageSelectorViewModelImpl(private val submissionSharedPreferencesRepository: SubmissionSharedPreferencesRepository) : ViewModel(), OrigamiRadioImageSelectorViewModel {
37
38 private var submissionMeasurementType: MutableLiveData<TrackerMeasurement.SubmissionMeasurementType?> = MutableLiveData()
39
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/radioimage/OrigamiRadioImageSelectorViewModel.kt:38:5Line detected, which is longer than the defined maximum line length in the code style.
35
36 class OrigamiRadioImageSelectorViewModelImpl(private val submissionSharedPreferencesRepository: SubmissionSharedPreferencesRepository) : ViewModel(), OrigamiRadioImageSelectorViewModel {
37
38 private var submissionMeasurementType: MutableLiveData<TrackerMeasurement.SubmissionMeasurementType?> = MutableLiveData()
39
40 private var _defaultValue: LiveData<Int?> = submissionMeasurementType.switchMap {
41 when (it) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/radioimage/OrigamiRadioImageSelectorViewModel.kt:42:13Line detected, which is longer than the defined maximum line length in the code style.
39
40 private var _defaultValue: LiveData<Int?> = submissionMeasurementType.switchMap {
41 when (it) {
42 TrackerMeasurement.SubmissionMeasurementType.SLEEP_QUALITY -> submissionSharedPreferencesRepository.getSleepQualityAsLiveData()
43 else -> MutableLiveData<Int?>().apply { postValue(null) }
44 }
45 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/radioimage/OrigamiRadioImageSelectorViewModel.kt:60:21Line detected, which is longer than the defined maximum line length in the code style.
57 setSleepQuality(value)
58 }
59 else -> {
60 L.i(OrigamiDropdown::class.java.name, "Component is unsupported by the measurementType ${submissionMeasurementType.value}")
61 }
62 }
63 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/radioimage/OrigamiRadioImageSelectorViewModelFactory.kt:30:5Line detected, which is longer than the defined maximum line length in the code style.
27 * Use this approach instead of creating the ViewModels directly inside the views
28 */
29 class OrigamiRadioImageSelectorViewModelInjector : OrigamiRadioImageSelectorViewModelAccessor {
30 override var viewModel: OrigamiRadioImageSelectorViewModel = OrigamiRadioImageSelectorViewModelFactory().create(OrigamiRadioImageSelectorViewModelImpl::class.java)
31 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/radioimage/model/RadioImageUiConfiguration.kt:15:9Line detected, which is longer than the defined maximum line length in the code style.
12 */
13 val titleRes: Int) {
14 companion object {
15 fun fromSubmissionMeasurementTypeOrNull(submissionMeasurementType: TrackerMeasurement.SubmissionMeasurementType?) =
16 when (submissionMeasurementType) {
17 TrackerMeasurement.SubmissionMeasurementType.SLEEP_QUALITY -> fromSleepQuality()
18 else -> null
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/radiotext/OrigamiRadioTextSelectorViewModel.kt:36:1Line detected, which is longer than the defined maximum line length in the code style.
33 fun initWithType(submissionMeasurementType: TrackerMeasurement.SubmissionMeasurementType)
34 }
35
36 class OrigamiRadioTextSelectorViewModelImpl(private val submissionSharedPreferencesRepository: SubmissionSharedPreferencesRepository,
37 private val trackerMeasurementRepository: TrackerMeasurementRepository) : ViewModel(), OrigamiRadioTextSelectorViewModel {
38
39 private var submissionMeasurementType: TrackerMeasurement.SubmissionMeasurementType? = null
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/radiotext/OrigamiRadioTextSelectorViewModel.kt:37:45Line detected, which is longer than the defined maximum line length in the code style.
34 }
35
36 class OrigamiRadioTextSelectorViewModelImpl(private val submissionSharedPreferencesRepository: SubmissionSharedPreferencesRepository,
37 private val trackerMeasurementRepository: TrackerMeasurementRepository) : ViewModel(), OrigamiRadioTextSelectorViewModel {
38
39 private var submissionMeasurementType: TrackerMeasurement.SubmissionMeasurementType? = null
40 private var _defaultValue: MutableLiveData<Int?> = MutableLiveData(null)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/radiotext/OrigamiRadioTextSelectorViewModel.kt:50:17Line detected, which is longer than the defined maximum line length in the code style.
47 this.submissionMeasurementType = submissionMeasurementType
48 when (this.submissionMeasurementType) {
49 TrackerMeasurement.SubmissionMeasurementType.RELATIONSHIP_LEVEL -> {
50 initForNumeric(TrackerMeasurement.MeasurementType.RELATIONSHIP, submissionSharedPreferencesRepository.getRelationshipLevel())
51 }
52 TrackerMeasurement.SubmissionMeasurementType.DIET_LEVEL -> {
53 initForNumeric(TrackerMeasurement.MeasurementType.UNDEFINED, submissionSharedPreferencesRepository.getDietLevel())
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/radiotext/OrigamiRadioTextSelectorViewModel.kt:53:17Line detected, which is longer than the defined maximum line length in the code style.
50 initForNumeric(TrackerMeasurement.MeasurementType.RELATIONSHIP, submissionSharedPreferencesRepository.getRelationshipLevel())
51 }
52 TrackerMeasurement.SubmissionMeasurementType.DIET_LEVEL -> {
53 initForNumeric(TrackerMeasurement.MeasurementType.UNDEFINED, submissionSharedPreferencesRepository.getDietLevel())
54 }
55 TrackerMeasurement.SubmissionMeasurementType.STRESS_LEVEL -> {
56 initForNumeric(TrackerMeasurement.MeasurementType.UNDEFINED, submissionSharedPreferencesRepository.getStressLevel())
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/radiotext/OrigamiRadioTextSelectorViewModel.kt:56:17Line detected, which is longer than the defined maximum line length in the code style.
53 initForNumeric(TrackerMeasurement.MeasurementType.UNDEFINED, submissionSharedPreferencesRepository.getDietLevel())
54 }
55 TrackerMeasurement.SubmissionMeasurementType.STRESS_LEVEL -> {
56 initForNumeric(TrackerMeasurement.MeasurementType.UNDEFINED, submissionSharedPreferencesRepository.getStressLevel())
57 }
58 else -> {
59 L.e(OrigamiTextView::class.java.name, "Component is unsupported by the measurementType ${this.submissionMeasurementType}")
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/radiotext/OrigamiRadioTextSelectorViewModel.kt:59:17Line detected, which is longer than the defined maximum line length in the code style.
56 initForNumeric(TrackerMeasurement.MeasurementType.UNDEFINED, submissionSharedPreferencesRepository.getStressLevel())
57 }
58 else -> {
59 L.e(OrigamiTextView::class.java.name, "Component is unsupported by the measurementType ${this.submissionMeasurementType}")
60 }
61 }
62 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/radiotext/OrigamiRadioTextSelectorViewModel.kt:77:21Line detected, which is longer than the defined maximum line length in the code style.
74 setStressLevel(value)
75 }
76 else -> {
77 L.i(OrigamiTextView::class.java.name, "Component is unsupported by the measurementType $submissionMeasurementType")
78 }
79 }
80 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/radiotext/OrigamiRadioTextSelectorViewModelFactory.kt:23:25Line detected, which is longer than the defined maximum line length in the code style.
20 Origami.sharedPreferencesForSubmission!!,
21 Origami.liveSharedPreferencesForSubmission!!),
22 TrackerMeasurementRepositoryImpl(
23 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
24 Origami.getDatabaseInstance().trackerMeasurementModel()
25
26 )) as T
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/radiotext/OrigamiRadioTextSelectorViewModelFactory.kt:39:5Line detected, which is longer than the defined maximum line length in the code style.
36 * Use this approach instead of creating the ViewModels directly inside the views
37 */
38 class OrigamiRadioTextSelectorViewModelInjector : OrigamiRadioTextSelectorViewModelAccessor {
39 override var viewModel: OrigamiRadioTextSelectorViewModel = OrigamiRadioTextSelectorViewModelFactory().create(OrigamiRadioTextSelectorViewModelImpl::class.java)
40 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/radiotext/model/RadioTextSelectorUiConfiguration.kt:20:9Line detected, which is longer than the defined maximum line length in the code style.
17 val isTextCenterVertical: Boolean = false
18 ) {
19 companion object {
20 fun fromSubmissionMeasurementTypeOrNull(submissionMeasurementType: TrackerMeasurement.SubmissionMeasurementType?) =
21 when (submissionMeasurementType) {
22 TrackerMeasurement.SubmissionMeasurementType.RELATIONSHIP_LEVEL -> fromRelationshipLevel()
23 TrackerMeasurement.SubmissionMeasurementType.DIET_LEVEL -> fromDietLevel()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/seekbar/OrigamiSeekBar.kt:39:13Line detected, which is longer than the defined maximum line length in the code style.
36 }
37 viewModel.seekBarValue.observe(owner) {
38 binding.seekBar.progress = it - 1
39 viewModel.seekBarValue.removeObservers(owner) // we need this value only once (otherwise it will be an endless loop)
40 }
41 }
42
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/seekbar/OrigamiSeekBarViewModel.kt:41:1Line detected, which is longer than the defined maximum line length in the code style.
38 fun initWithType(submissionMeasurementType: TrackerMeasurement.SubmissionMeasurementType)
39 }
40
41 class OrigamiSeekBarViewModelImpl(private val submissionSharedPreferencesRepository: SubmissionSharedPreferencesRepository) : ViewModel(), OrigamiSeekBarViewModel {
42
43 private var submissionMeasurementType: TrackerMeasurement.SubmissionMeasurementType? = null
44 private var defaultValue: MutableLiveData<Int> = MutableLiveData()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/seekbar/OrigamiSeekBarViewModel.kt:87:17Line detected, which is longer than the defined maximum line length in the code style.
84 defaultValue.value = submissionSharedPreferencesRepository.getStressLevel()
85 }
86 else -> {
87 L.i(OrigamiDropdown::class.java.name, "Component is unsupported by the measurementType ${this.submissionMeasurementType}")
88 }
89 }
90 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/seekbar/OrigamiSeekBarViewModel.kt:107:21Line detected, which is longer than the defined maximum line length in the code style.
104 setStressLevel(progressValue)
105 }
106 else -> {
107 L.i(OrigamiDropdown::class.java.name, "Component is unsupported by the measurementType $submissionMeasurementType")
108 }
109 }
110 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/seekbar/OrigamiSeekBarViewModelFactory.kt:30:5Line detected, which is longer than the defined maximum line length in the code style.
27 * Use this approach instead of creating the ViewModels directly inside the views
28 */
29 class OrigamiSeekBarViewModelInjector : OrigamiSeekBarViewModelAccessor {
30 override var viewModel: OrigamiSeekBarViewModel = OrigamiSeekBarViewModelFactory().create(OrigamiSeekBarViewModelImpl::class.java)
31 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/seekbar/model/SeekBarUiConfiguration.kt:15:9Line detected, which is longer than the defined maximum line length in the code style.
12 */
13 val maxRatingValue: Int) {
14 companion object {
15 fun fromSubmissionMeasurementTypeOrNull(submissionMeasurementType: TrackerMeasurement.SubmissionMeasurementType?) =
16 when (submissionMeasurementType) {
17 TrackerMeasurement.SubmissionMeasurementType.DIET_MEAL_QUALITY -> fromDietMealQuality()
18 TrackerMeasurement.SubmissionMeasurementType.FITNESS_LEVEL -> fromFitnessLevel()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/text/OrigamiTextViewViewModel.kt:44:1Line detected, which is longer than the defined maximum line length in the code style.
41 fun updateValue(value: Double?)
42 }
43
44 class OrigamiTextViewViewModelImpl(private val submissionSharedPreferencesRepository: SubmissionSharedPreferencesRepository,
45 private val trackerMeasurementRepository: TrackerMeasurementRepository) : ViewModel(), OrigamiTextViewViewModel {
46
47 private var submissionMeasurementType: TrackerMeasurement.SubmissionMeasurementType? = null
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/text/OrigamiTextViewViewModel.kt:45:36Line detected, which is longer than the defined maximum line length in the code style.
42 }
43
44 class OrigamiTextViewViewModelImpl(private val submissionSharedPreferencesRepository: SubmissionSharedPreferencesRepository,
45 private val trackerMeasurementRepository: TrackerMeasurementRepository) : ViewModel(), OrigamiTextViewViewModel {
46
47 private var submissionMeasurementType: TrackerMeasurement.SubmissionMeasurementType? = null
48 private var _hintContainer: MutableLiveData<TextHintContainer> = MutableLiveData()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/text/OrigamiTextViewViewModel.kt:64:17Line detected, which is longer than the defined maximum line length in the code style.
61 this.submissionMeasurementType = submissionMeasurementType
62 when (this.submissionMeasurementType) {
63 TrackerMeasurement.SubmissionMeasurementType.BLOOD_GLUCOSE_FASTING -> {
64 initForNumeric(TrackerMeasurement.MeasurementType.FASTING_GLUCOSE, submissionSharedPreferencesRepository.getBloodGlucoseFasting())
65 }
66 TrackerMeasurement.SubmissionMeasurementType.BLOOD_PRESSURE_SYSTOLIC -> {
67 initForNumeric(TrackerMeasurement.MeasurementType.SYSTOLIC, submissionSharedPreferencesRepository.getBloodPressureSystolic())
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/text/OrigamiTextViewViewModel.kt:67:17Line detected, which is longer than the defined maximum line length in the code style.
64 initForNumeric(TrackerMeasurement.MeasurementType.FASTING_GLUCOSE, submissionSharedPreferencesRepository.getBloodGlucoseFasting())
65 }
66 TrackerMeasurement.SubmissionMeasurementType.BLOOD_PRESSURE_SYSTOLIC -> {
67 initForNumeric(TrackerMeasurement.MeasurementType.SYSTOLIC, submissionSharedPreferencesRepository.getBloodPressureSystolic())
68 }
69 TrackerMeasurement.SubmissionMeasurementType.BLOOD_PRESSURE_DIASTOLIC -> {
70 initForNumeric(TrackerMeasurement.MeasurementType.DIASTOLIC, submissionSharedPreferencesRepository.getBloodPressureDiastolic())
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/text/OrigamiTextViewViewModel.kt:70:17Line detected, which is longer than the defined maximum line length in the code style.
67 initForNumeric(TrackerMeasurement.MeasurementType.SYSTOLIC, submissionSharedPreferencesRepository.getBloodPressureSystolic())
68 }
69 TrackerMeasurement.SubmissionMeasurementType.BLOOD_PRESSURE_DIASTOLIC -> {
70 initForNumeric(TrackerMeasurement.MeasurementType.DIASTOLIC, submissionSharedPreferencesRepository.getBloodPressureDiastolic())
71 }
72 TrackerMeasurement.SubmissionMeasurementType.CHOLESTEROL_TOTAL -> {
73 initForNumeric(TrackerMeasurement.MeasurementType.TOTAL_CHOLESTEROL, submissionSharedPreferencesRepository.getCholesterolTotal())
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/text/OrigamiTextViewViewModel.kt:73:17Line detected, which is longer than the defined maximum line length in the code style.
70 initForNumeric(TrackerMeasurement.MeasurementType.DIASTOLIC, submissionSharedPreferencesRepository.getBloodPressureDiastolic())
71 }
72 TrackerMeasurement.SubmissionMeasurementType.CHOLESTEROL_TOTAL -> {
73 initForNumeric(TrackerMeasurement.MeasurementType.TOTAL_CHOLESTEROL, submissionSharedPreferencesRepository.getCholesterolTotal())
74 }
75 TrackerMeasurement.SubmissionMeasurementType.STEPS_COUNT -> {
76 initForNumeric(TrackerMeasurement.MeasurementType.STEPS, submissionSharedPreferencesRepository.getStepsCount().toDouble())
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/text/OrigamiTextViewViewModel.kt:76:17Line detected, which is longer than the defined maximum line length in the code style.
73 initForNumeric(TrackerMeasurement.MeasurementType.TOTAL_CHOLESTEROL, submissionSharedPreferencesRepository.getCholesterolTotal())
74 }
75 TrackerMeasurement.SubmissionMeasurementType.STEPS_COUNT -> {
76 initForNumeric(TrackerMeasurement.MeasurementType.STEPS, submissionSharedPreferencesRepository.getStepsCount().toDouble())
77 }
78 TrackerMeasurement.SubmissionMeasurementType.WEIGHT -> {
79 initForNumeric(TrackerMeasurement.MeasurementType.WEIGHT, submissionSharedPreferencesRepository.getWeight().toDouble())
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/text/OrigamiTextViewViewModel.kt:79:17Line detected, which is longer than the defined maximum line length in the code style.
76 initForNumeric(TrackerMeasurement.MeasurementType.STEPS, submissionSharedPreferencesRepository.getStepsCount().toDouble())
77 }
78 TrackerMeasurement.SubmissionMeasurementType.WEIGHT -> {
79 initForNumeric(TrackerMeasurement.MeasurementType.WEIGHT, submissionSharedPreferencesRepository.getWeight().toDouble())
80 }
81 else -> {
82 L.e(OrigamiTextView::class.java.name, "Component is unsupported by the measurementType ${this.submissionMeasurementType}")
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/text/OrigamiTextViewViewModel.kt:82:17Line detected, which is longer than the defined maximum line length in the code style.
79 initForNumeric(TrackerMeasurement.MeasurementType.WEIGHT, submissionSharedPreferencesRepository.getWeight().toDouble())
80 }
81 else -> {
82 L.e(OrigamiTextView::class.java.name, "Component is unsupported by the measurementType ${this.submissionMeasurementType}")
83 }
84 }
85 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/text/OrigamiTextViewViewModel.kt:109:21Line detected, which is longer than the defined maximum line length in the code style.
106 setWeight(value?.toInt())
107 }
108 else -> {
109 L.i(OrigamiTextView::class.java.name, "Component is unsupported by the measurementType $submissionMeasurementType")
110 }
111 }
112 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/text/OrigamiTextViewViewModelFactory.kt:23:25Line detected, which is longer than the defined maximum line length in the code style.
20 Origami.sharedPreferencesForSubmission!!,
21 Origami.liveSharedPreferencesForSubmission!!),
22 TrackerMeasurementRepositoryImpl(
23 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
24 Origami.getDatabaseInstance().trackerMeasurementModel()
25
26 )) as T
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/text/OrigamiTextViewViewModelFactory.kt:39:5Line detected, which is longer than the defined maximum line length in the code style.
36 * Use this approach instead of creating the ViewModels directly inside the views
37 */
38 class OrigamiTextViewViewModelInjector : OrigamiTextViewViewModelAccessor {
39 override var viewModel: OrigamiTextViewViewModel = OrigamiTextViewViewModelFactory().create(OrigamiTextViewViewModelImpl::class.java)
40 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/title/OrigamiTitleViewModel.kt:35:17Line detected, which is longer than the defined maximum line length in the code style.
32 _title.postValue(submissionSharedPreferencesRepository.getStressLevel())
33 }
34 else -> {
35 L.e(OrigamiTitle::class.java.name, "Component is unsupported by the measurementType $submissionMeasurementType")
36 }
37 }
38 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/component/title/OrigamiTitleViewModelFactory.kt:30:5Line detected, which is longer than the defined maximum line length in the code style.
27 * Use this approach instead of creating the ViewModels directly inside the views
28 */
29 class OrigamiTitleViewModelInjector : OrigamiTitleViewModelAccessor {
30 override var viewModel: OrigamiTitleViewModel = OrigamiTitleViewModelFactory().create(OrigamiTitleViewModelImpl::class.java)
31 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/container/alcohol/AlcoholSubmissionView.kt:18:1Line detected, which is longer than the defined maximum line length in the code style.
15 /**
16 * View holding components to submit an Alcohol tracker
17 */
18 class AlcoholSubmissionView(context: Context, attrs: AttributeSet?) : LinearLayout(context, attrs), SubmissionContainer {
19
20 private val binding: ViewSubmissionContainerAlcoholBinding =
21 ViewSubmissionContainerAlcoholBinding.inflate(LayoutInflater.from(context), this, true)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/container/bloodglucose/BloodGlucoseSubmissionView.kt:18:1Line detected, which is longer than the defined maximum line length in the code style.
15 /**
16 * View holding components to submit a Blood Glucose tracker
17 */
18 class BloodGlucoseSubmissionView(context: Context, attrs: AttributeSet?) : LinearLayout(context, attrs), SubmissionContainer {
19
20 private val binding: ViewSubmissionContainerBloodGlucoseBinding =
21 ViewSubmissionContainerBloodGlucoseBinding.inflate(LayoutInflater.from(context), this, true)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/container/bloodpressure/BloodPressureSubmissionView.kt:18:1Line detected, which is longer than the defined maximum line length in the code style.
15 /**
16 * View holding components to submit a Blood Pressure tracker
17 */
18 class BloodPressureSubmissionView(context: Context, attrs: AttributeSet?) : LinearLayout(context, attrs), SubmissionContainer {
19
20 private val binding: ViewSubmissionContainerBloodPressureBinding =
21 ViewSubmissionContainerBloodPressureBinding.inflate(LayoutInflater.from(context), this, true)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/container/cholesterol/CholesterolSubmissionView.kt:18:1Line detected, which is longer than the defined maximum line length in the code style.
15 /**
16 * View holding components to submit a Cholesterol tracker
17 */
18 class CholesterolSubmissionView(context: Context, attrs: AttributeSet?) : LinearLayout(context, attrs), SubmissionContainer {
19
20 private val binding: ViewSubmissionContainerCholesterolBinding =
21 ViewSubmissionContainerCholesterolBinding.inflate(LayoutInflater.from(context), this, true)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/container/diet/DietCameraInfoView.kt:45:17Line detected, which is longer than the defined maximum line length in the code style.
42 PassioSDK.instance.configure(config) { passioStatus ->
43 when (passioStatus.mode) {
44 PassioMode.NOT_READY -> L.d(PassioSDK::class.java.name, "Not ready: " + passioStatus.debugMessage)
45 PassioMode.IS_BEING_CONFIGURED -> L.d(PassioSDK::class.java.name, "Is being configured: " + passioStatus.debugMessage)
46 PassioMode.IS_AUTO_UPDATING -> L.d(PassioSDK::class.java.name, "Auto updating: " + passioStatus.debugMessage)
47 PassioMode.IS_READY_FOR_NUTRITION -> L.d(PassioSDK::class.java.name, "Ready for nutrition: " + passioStatus.debugMessage)
48 PassioMode.IS_READY_FOR_DETECTION -> L.d(PassioSDK::class.java.name, "Ready for detection: " + passioStatus.debugMessage)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/container/diet/DietCameraInfoView.kt:46:17Line detected, which is longer than the defined maximum line length in the code style.
43 when (passioStatus.mode) {
44 PassioMode.NOT_READY -> L.d(PassioSDK::class.java.name, "Not ready: " + passioStatus.debugMessage)
45 PassioMode.IS_BEING_CONFIGURED -> L.d(PassioSDK::class.java.name, "Is being configured: " + passioStatus.debugMessage)
46 PassioMode.IS_AUTO_UPDATING -> L.d(PassioSDK::class.java.name, "Auto updating: " + passioStatus.debugMessage)
47 PassioMode.IS_READY_FOR_NUTRITION -> L.d(PassioSDK::class.java.name, "Ready for nutrition: " + passioStatus.debugMessage)
48 PassioMode.IS_READY_FOR_DETECTION -> L.d(PassioSDK::class.java.name, "Ready for detection: " + passioStatus.debugMessage)
49 PassioMode.FAILED_TO_CONFIGURE -> L.d(PassioSDK::class.java.name, "Failed to configure: " + passioStatus.debugMessage)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/container/diet/DietCameraInfoView.kt:47:17Line detected, which is longer than the defined maximum line length in the code style.
44 PassioMode.NOT_READY -> L.d(PassioSDK::class.java.name, "Not ready: " + passioStatus.debugMessage)
45 PassioMode.IS_BEING_CONFIGURED -> L.d(PassioSDK::class.java.name, "Is being configured: " + passioStatus.debugMessage)
46 PassioMode.IS_AUTO_UPDATING -> L.d(PassioSDK::class.java.name, "Auto updating: " + passioStatus.debugMessage)
47 PassioMode.IS_READY_FOR_NUTRITION -> L.d(PassioSDK::class.java.name, "Ready for nutrition: " + passioStatus.debugMessage)
48 PassioMode.IS_READY_FOR_DETECTION -> L.d(PassioSDK::class.java.name, "Ready for detection: " + passioStatus.debugMessage)
49 PassioMode.FAILED_TO_CONFIGURE -> L.d(PassioSDK::class.java.name, "Failed to configure: " + passioStatus.debugMessage)
50 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/container/diet/DietCameraInfoView.kt:48:17Line detected, which is longer than the defined maximum line length in the code style.
45 PassioMode.IS_BEING_CONFIGURED -> L.d(PassioSDK::class.java.name, "Is being configured: " + passioStatus.debugMessage)
46 PassioMode.IS_AUTO_UPDATING -> L.d(PassioSDK::class.java.name, "Auto updating: " + passioStatus.debugMessage)
47 PassioMode.IS_READY_FOR_NUTRITION -> L.d(PassioSDK::class.java.name, "Ready for nutrition: " + passioStatus.debugMessage)
48 PassioMode.IS_READY_FOR_DETECTION -> L.d(PassioSDK::class.java.name, "Ready for detection: " + passioStatus.debugMessage)
49 PassioMode.FAILED_TO_CONFIGURE -> L.d(PassioSDK::class.java.name, "Failed to configure: " + passioStatus.debugMessage)
50 }
51 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/container/diet/DietCameraInfoView.kt:49:17Line detected, which is longer than the defined maximum line length in the code style.
46 PassioMode.IS_AUTO_UPDATING -> L.d(PassioSDK::class.java.name, "Auto updating: " + passioStatus.debugMessage)
47 PassioMode.IS_READY_FOR_NUTRITION -> L.d(PassioSDK::class.java.name, "Ready for nutrition: " + passioStatus.debugMessage)
48 PassioMode.IS_READY_FOR_DETECTION -> L.d(PassioSDK::class.java.name, "Ready for detection: " + passioStatus.debugMessage)
49 PassioMode.FAILED_TO_CONFIGURE -> L.d(PassioSDK::class.java.name, "Failed to configure: " + passioStatus.debugMessage)
50 }
51 }
52 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/container/diet/DietCameraInfoView.kt:123:13Line detected, which is longer than the defined maximum line length in the code style.
120 PermissionsUtil.PermissionValue.DIET_CAMERA.permissionNames,
121 RequestCode.PERMISSIONS_MAIN_REQUEST_CODE
122 )
123 PermissionsUtil.PermissionState.PERMANENTLY_DISABLED -> vmAccessor.viewModel.shouldShowCameraPermissionMisconfiguredDialog.requestNavigation()
124 PermissionsUtil.PermissionState.GRANTED -> openCamera()
125 }
126 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/container/diet/DietCameraInfoView.kt:135:13Line detected, which is longer than the defined maximum line length in the code style.
132 PermissionsUtil.PermissionValue.DIET_STORAGE.permissionNames,
133 RequestCode.PERMISSIONS_ADDITIONAL_REQUEST_CODE
134 )
135 PermissionsUtil.PermissionState.PERMANENTLY_DISABLED -> vmAccessor.viewModel.shouldShowStoragePermissionMisconfiguredDialog.requestNavigation()
136 PermissionsUtil.PermissionState.GRANTED -> openGallery()
137 }
138 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/container/diet/DietCameraInfoView.kt:147:13Line detected, which is longer than the defined maximum line length in the code style.
144 PermissionsUtil.PermissionValue.DIET_CAMERA.permissionNames,
145 RequestCode.PERMISSIONS_MAIN_REQUEST_CODE
146 )
147 PermissionsUtil.PermissionState.PREVIOUSLY_DENIED -> vmAccessor.viewModel.shouldShowCameraPermissionDeniedDialog.requestNavigationWith(essentialFragment)
148 PermissionsUtil.PermissionState.PERMANENTLY_DISABLED -> vmAccessor.viewModel.shouldShowCameraPermissionMisconfiguredDialog.requestNavigation()
149 PermissionsUtil.PermissionState.GRANTED -> openCamera()
150 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/container/diet/DietCameraInfoView.kt:148:13Line detected, which is longer than the defined maximum line length in the code style.
145 RequestCode.PERMISSIONS_MAIN_REQUEST_CODE
146 )
147 PermissionsUtil.PermissionState.PREVIOUSLY_DENIED -> vmAccessor.viewModel.shouldShowCameraPermissionDeniedDialog.requestNavigationWith(essentialFragment)
148 PermissionsUtil.PermissionState.PERMANENTLY_DISABLED -> vmAccessor.viewModel.shouldShowCameraPermissionMisconfiguredDialog.requestNavigation()
149 PermissionsUtil.PermissionState.GRANTED -> openCamera()
150 }
151 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/container/diet/DietCameraInfoView.kt:160:13Line detected, which is longer than the defined maximum line length in the code style.
157 PermissionsUtil.PermissionValue.DIET_STORAGE.permissionNames,
158 RequestCode.PERMISSIONS_MAIN_REQUEST_CODE
159 )
160 PermissionsUtil.PermissionState.PREVIOUSLY_DENIED -> vmAccessor.viewModel.shouldShowStoragePermissionDeniedDialog.requestNavigationWith(essentialFragment)
161 PermissionsUtil.PermissionState.PERMANENTLY_DISABLED -> vmAccessor.viewModel.shouldShowStoragePermissionMisconfiguredDialog.requestNavigation()
162 PermissionsUtil.PermissionState.GRANTED -> openGallery()
163 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/container/diet/DietCameraInfoView.kt:161:13Line detected, which is longer than the defined maximum line length in the code style.
158 RequestCode.PERMISSIONS_MAIN_REQUEST_CODE
159 )
160 PermissionsUtil.PermissionState.PREVIOUSLY_DENIED -> vmAccessor.viewModel.shouldShowStoragePermissionDeniedDialog.requestNavigationWith(essentialFragment)
161 PermissionsUtil.PermissionState.PERMANENTLY_DISABLED -> vmAccessor.viewModel.shouldShowStoragePermissionMisconfiguredDialog.requestNavigation()
162 PermissionsUtil.PermissionState.GRANTED -> openGallery()
163 }
164 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/container/diet/DietCameraInfoViewModel.kt:19:1Line detected, which is longer than the defined maximum line length in the code style.
16 fun setDietCameraDialogAsShown()
17 }
18
19 class DietCameraInfoViewModelImpl(private val sharedPreferencesRepository: OrigamiSharedPreferencesRepository) : DietCameraInfoViewModel, ViewModel() {
20 override val shouldShowCameraPermissionDeniedDialog: TypedNavigationLiveData<EssentialFragment> = TypedNavigationLiveData()
21 override val shouldShowStoragePermissionDeniedDialog: TypedNavigationLiveData<EssentialFragment> = TypedNavigationLiveData()
22 override val shouldShowCameraPermissionMisconfiguredDialog: NavigationLiveData = NavigationLiveData()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/container/diet/DietCameraInfoViewModel.kt:20:5Line detected, which is longer than the defined maximum line length in the code style.
17 }
18
19 class DietCameraInfoViewModelImpl(private val sharedPreferencesRepository: OrigamiSharedPreferencesRepository) : DietCameraInfoViewModel, ViewModel() {
20 override val shouldShowCameraPermissionDeniedDialog: TypedNavigationLiveData<EssentialFragment> = TypedNavigationLiveData()
21 override val shouldShowStoragePermissionDeniedDialog: TypedNavigationLiveData<EssentialFragment> = TypedNavigationLiveData()
22 override val shouldShowCameraPermissionMisconfiguredDialog: NavigationLiveData = NavigationLiveData()
23 override val shouldShowStoragePermissionMisconfiguredDialog: NavigationLiveData = NavigationLiveData()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/container/diet/DietCameraInfoViewModel.kt:21:5Line detected, which is longer than the defined maximum line length in the code style.
18
19 class DietCameraInfoViewModelImpl(private val sharedPreferencesRepository: OrigamiSharedPreferencesRepository) : DietCameraInfoViewModel, ViewModel() {
20 override val shouldShowCameraPermissionDeniedDialog: TypedNavigationLiveData<EssentialFragment> = TypedNavigationLiveData()
21 override val shouldShowStoragePermissionDeniedDialog: TypedNavigationLiveData<EssentialFragment> = TypedNavigationLiveData()
22 override val shouldShowCameraPermissionMisconfiguredDialog: NavigationLiveData = NavigationLiveData()
23 override val shouldShowStoragePermissionMisconfiguredDialog: NavigationLiveData = NavigationLiveData()
24 override val shouldShowNoInternetDialog: NavigationLiveData = NavigationLiveData()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/container/diet/DietCameraInfoViewModelFactory.kt:16:5Line detected, which is longer than the defined maximum line length in the code style.
13 }
14
15 class DietCameraInfoViewModelInjector : DietCameraInfoViewModelAccessor {
16 override var viewModel: DietCameraInfoViewModel = DietCameraInfoViewModelFactory().create(DietCameraInfoViewModelImpl::class.java)
17 }
18
19 interface DietCameraInfoViewModelAccessor {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/container/diet/DietCameraSubmittedViewModel.kt:14:1Line detected, which is longer than the defined maximum line length in the code style.
11 val dietImageWithLabel: LiveData<Pair<String, String>?>
12 }
13
14 class DietCameraSubmittedViewModelImpl(submissionSharedPreferencesRepository: SubmissionSharedPreferencesRepository) : DietCameraSubmittedViewModel, ViewModel() {
15 override val dietImageWithLabel: LiveData<Pair<String, String>?> = submissionSharedPreferencesRepository.getDietImageWithLabelAsLiveData()
16 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/container/diet/DietCameraSubmittedViewModel.kt:15:5Line detected, which is longer than the defined maximum line length in the code style.
12 }
13
14 class DietCameraSubmittedViewModelImpl(submissionSharedPreferencesRepository: SubmissionSharedPreferencesRepository) : DietCameraSubmittedViewModel, ViewModel() {
15 override val dietImageWithLabel: LiveData<Pair<String, String>?> = submissionSharedPreferencesRepository.getDietImageWithLabelAsLiveData()
16 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/container/diet/DietCameraSubmittedViewModelFactory.kt:17:5Line detected, which is longer than the defined maximum line length in the code style.
14 }
15
16 class DietCameraSubmittedViewModelInjector : DietCameraSubmittedViewModelAccessor {
17 override var viewModel: DietCameraSubmittedViewModel = DietCameraSubmittedViewModelFactory().create(DietCameraSubmittedViewModelImpl::class.java)
18 }
19
20 interface DietCameraSubmittedViewModelAccessor {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/container/fitness/FitnessSubmissionView.kt:18:1Line detected, which is longer than the defined maximum line length in the code style.
15 /**
16 * View holding components to submit a Fitness tracker
17 */
18 class FitnessSubmissionView(context: Context, attrs: AttributeSet?) : LinearLayout(context, attrs), SubmissionContainer {
19
20 private val binding: ViewSubmissionContainerFitnessBinding =
21 ViewSubmissionContainerFitnessBinding.inflate(LayoutInflater.from(context), this, true)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/container/medication/MedicationSubmissionContainerViewModel.kt:55:17Line detected, which is longer than the defined maximum line length in the code style.
52 */
53 private val _trackerDailies: LiveData<List<TrackerItem>> =
54 selectedDate.switchMap {
55 trackerHistoryRepository.getDayTrackerHistoryItems(OrigamiTrackerType.MEDICATION_GROUP, 0, it.toTrackerDateString())
56 }
57
58 private val _medicationSetting: LiveData<List<MedicationSetting>> =
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/container/medication/MedicationSubmissionContainerViewModelFactory.kt:49:5Line detected, which is longer than the defined maximum line length in the code style.
46 * Use this approach instead of creating the ViewModels directly inside the views
47 */
48 class MedicationSubmissionContainerViewModelInjector : MedicationSubmissionContainerViewModelAccessor {
49 override var viewModel: MedicationSubmissionContainerViewModel = MedicationSubmissionContainerViewModelFactory().create(MedicationSubmissionContainerViewModelImpl::class.java)
50 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/container/medication/MedicationSubmissionView.kt:18:1Line detected, which is longer than the defined maximum line length in the code style.
15 import com.sharecare.realgreen.origami.presentation.submission.container.SubmissionContainer
16 import org.joda.time.DateTime
17
18 class MedicationSubmissionView(context: Context, attrs: AttributeSet?) : LinearLayout(context, attrs), SubmissionContainer,
19 MedicationSubmissionContainerViewModelAccessor by MedicationSubmissionContainerViewModelInjector() {
20
21 private val binding: ViewSubmissionContainerMedicationBinding =
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/container/medication/MedicationSubmissionView.kt:40:21Line detected, which is longer than the defined maximum line length in the code style.
37 binding.submissionComponentContainer.removeAllViewsInLayout()
38 if (!it.isNullOrEmpty()) {
39 it.forEach { medication ->
40 val itemBinding = ItemSubmissionContainerMedicationBinding.inflate(LayoutInflater.from(context), binding.submissionComponentContainer, true)
41 itemBinding.medicationSubmissionItemTitle.text = medication.displayName
42 with(itemBinding.origamiDropdown) {
43 tag = medication.rxCode
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/container/medication/MedicationSubmissionViewModel.kt:32:9Line detected, which is longer than the defined maximum line length in the code style.
29 sharedPreferencesRepository: OrigamiSharedPreferencesRepository,
30 liveSharedPreferencesRepository: LiveSharedPreferencesRepository,
31 configurationRepository: ConfigurationRepository) :
32 CommonViewModelImpl(sharedPreferencesRepository, submissionSharedPreferencesRepository, liveSharedPreferencesRepository,
33 trackerRepository, greenDayRepository, configurationRepository, OrigamiTrackerType.MEDICATION_GROUP), MedicationSubmissionViewModel {
34
35 private val _medicationSetting: LiveData<List<MedicationSetting>> =
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/container/medication/MedicationSubmissionViewModel.kt:33:17Line detected, which is longer than the defined maximum line length in the code style.
30 liveSharedPreferencesRepository: LiveSharedPreferencesRepository,
31 configurationRepository: ConfigurationRepository) :
32 CommonViewModelImpl(sharedPreferencesRepository, submissionSharedPreferencesRepository, liveSharedPreferencesRepository,
33 trackerRepository, greenDayRepository, configurationRepository, OrigamiTrackerType.MEDICATION_GROUP), MedicationSubmissionViewModel {
34
35 private val _medicationSetting: LiveData<List<MedicationSetting>> =
36 selectedDate.switchMap { medicationSubmissionRepository.getMedicationCodes(it.toTrackerDateString()) }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/container/medication/MedicationSubmissionViewModel.kt:43:13Line detected, which is longer than the defined maximum line length in the code style.
40 private val intakeObserver = _medicationSetting.switchMap { medicationSettings ->
41 val intakeObserver = MediatorLiveData<Boolean>()
42 medicationSettings.forEach { setting ->
43 intakeObserver.addSource(submissionSharedPreferencesRepository.getMedicationIntakeAsLiveData(setting.rxCode)) { intake ->
44 intakeList[setting.rxCode] = intake ?: 0
45 intakeObserver.value = intakeList.filterValues { it > 0 }.isNotEmpty()
46 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/container/relationship/RelationshipSubmissionView.kt:18:1Line detected, which is longer than the defined maximum line length in the code style.
15 /**
16 * View holding components to submit a Relationship tracker
17 */
18 class RelationshipSubmissionView(context: Context, attrs: AttributeSet?) : LinearLayout(context, attrs), SubmissionContainer {
19
20 private val binding: ViewSubmissionContainerRelationshipBinding =
21 ViewSubmissionContainerRelationshipBinding.inflate(LayoutInflater.from(context), this, true)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/container/sleep/SleepSubmissionView.kt:54:9Line detected, which is longer than the defined maximum line length in the code style.
51 }
52
53 override fun attachLifecycleOwner(owner: LifecycleOwner) {
54 binding.submissionComponentContainer.children.filter { it.isVisible }.filterIsInstance<SubmissionComponent>().forEach {
55 it.attachLifecycleOwner(owner)
56 }
57 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/container/stress/StressVoiceReadOnlySubmissionView.kt:18:1Line detected, which is longer than the defined maximum line length in the code style.
15 /**
16 * View holding components to submit a Stress tracker
17 */
18 class StressVoiceReadOnlySubmissionView(context: Context, attrs: AttributeSet?) : LinearLayout(context, attrs), SubmissionContainer {
19
20 private val binding: ViewSubmissionContainerStressVoiceReadOnlyBinding =
21 ViewSubmissionContainerStressVoiceReadOnlyBinding.inflate(LayoutInflater.from(context), this, true)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/gdtstack/GdtStackFragment.kt:232:17Line detected, which is longer than the defined maximum line length in the code style.
229 private fun checkCameraPermissionsOnResult() {
230 when (viewModel.selectedTrackerType.value) {
231 OrigamiTrackerType.DIET ->
232 binding.viewPager.findViewWithTag<ViewGroup>(StackViewPager.VIEWPAGER_POSITION + viewModel.provideSelectedPosition())
233 ?.findViewById<LinearLayout>(R.id.tracker_input_area)?.children
234 ?.filterIsInstance(DietCameraInfoView::class.java)
235 ?.firstOrNull { it.isVisible }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/gdtstack/GdtStackFragment.kt:244:17Line detected, which is longer than the defined maximum line length in the code style.
241 private fun checkStoragePermissionsOnResult() {
242 when (viewModel.selectedTrackerType.value) {
243 OrigamiTrackerType.DIET ->
244 binding.viewPager.findViewWithTag<ViewGroup>(StackViewPager.VIEWPAGER_POSITION + viewModel.provideSelectedPosition())
245 ?.findViewById<LinearLayout>(R.id.tracker_input_area)?.children
246 ?.filterIsInstance(DietCameraInfoView::class.java)
247 ?.firstOrNull { it.isVisible }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/gdtstack/GdtStackFragment.kt:355:9Line detected, which is longer than the defined maximum line length in the code style.
352 }
353
354 override fun onDestroy() {
355 // it was discovered that in some cases the default viewModel.onCleared() method is not called when the fragment is destroyed
356 // so we have to do the cleaning manually
357 viewModel.onClear()
358 super.onDestroy()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/gdtstack/GdtStackFragment.kt:364:13Line detected, which is longer than the defined maximum line length in the code style.
361 companion object {
362 @JvmStatic
363 fun start(navigationController: NavigationController) {
364 // if we start the GDTstack from here (by a button click) – any previously saved GDTstack position should be removed from the shared preferences
365 // (we are starting fresh)
366 SubmissionSharedPreferencesRepositoryImpl(
367 Origami.sharedPreferencesForSubmission!!, Origami.liveSharedPreferencesForSubmission!!).removeGdtStackPosition()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/gdtstack/GdtStackFragment.kt:367:17Line detected, which is longer than the defined maximum line length in the code style.
364 // if we start the GDTstack from here (by a button click) – any previously saved GDTstack position should be removed from the shared preferences
365 // (we are starting fresh)
366 SubmissionSharedPreferencesRepositoryImpl(
367 Origami.sharedPreferencesForSubmission!!, Origami.liveSharedPreferencesForSubmission!!).removeGdtStackPosition()
368 navigationController.goToNextFragment(GdtStackFragment())
369 }
370 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/gdtstack/GdtStackViewModel.kt:98:6Line detected, which is longer than the defined maximum line length in the code style.
95 val shouldNavigateToAchievementScreen: TypedNavigationLiveData<GdtStackAchievementFragment.AchievementScreenType>
96
97 /**
98 * Calculates the type of the achievement screen depending on due trackers, if today is a green day and other parameters
99 * Passes it to shouldNavigateToAchievementScreen
100 */
101 fun calculateScreenDestination()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/gdtstack/GdtStackViewModel.kt:137:29Line detected, which is longer than the defined maximum line length in the code style.
134 class GdtStackViewModelImpl(private val greenDayRepository: GreenDayRepository,
135 private val origamiSharedPreferencesRepository: OrigamiSharedPreferencesRepository,
136 private val submissionSharedPreferencesRepository: SubmissionSharedPreferencesRepository,
137 private val configurationRepository: ConfigurationRepository) : ViewModel(), GdtStackViewModel {
138 /**
139 * The amount of cards in the adapter
140 */
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/gdtstack/GdtStackViewModel.kt:183:5Line detected, which is longer than the defined maximum line length in the code style.
180 /**
181 * Green Day Trackers that are needed to be represented in the GDT stack
182 */
183 private var _greenDayTrackers: LiveData<List<GreenDayTracker>> = greenDay.combineLatest(shouldReleaseGreenDay.shouldNavigate)
184 .asFlow()
185 .map { pair ->
186 val greenDay = pair.first
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/gdtstack/GdtStackViewModel.kt:218:6Line detected, which is longer than the defined maximum line length in the code style.
215 }
216
217 /**
218 * Calculates the type of the achievement screen depending on due trackers, if today is a green day and other parameters
219 */
220 override fun calculateScreenDestination() {
221 greenDayRepository.requestGreenDay(DateTime.now().toTrackerDateString(), false) { greenDay ->
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/gdtstack/GdtStackViewModel.kt:242:5Line detected, which is longer than the defined maximum line length in the code style.
239 /**
240 * Provides the amount of due trackers until the day is qualified as a green day
241 */
242 override fun provideTrackersToMakeDayGreen(): Int? = greenDayRepository.getGreenDaySynchronously(DateTime.now().toTrackerDateString())?.trackersToGreenDay
243
244 /**
245 * Provides the amount of cards submitted per one gdt stack session
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/gdtstack/GdtStackViewModel.kt:321:5Line detected, which is longer than the defined maximum line length in the code style.
318 /**
319 * A trigger to navigate to the achievement screen
320 */
321 override val shouldNavigateToAchievementScreen: TypedNavigationLiveData<GdtStackAchievementFragment.AchievementScreenType> = TypedNavigationLiveData()
322
323 /**
324 * Updates the local version of a GreenDay by a network call.
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/gdtstack/GdtStackViewModel.kt:362:9Line detected, which is longer than the defined maximum line length in the code style.
359 }
360
361 override fun onClear() {
362 // we clean everything but the saved GDTstack position. The GDTstack position is cleaned in GdtStackFragment.start()
363 submissionSharedPreferencesRepository.clear()
364 submissionSharedPreferencesRepository.setGdtStackPosition(position.value)
365 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/gdtstack/GdtStackViewModelFactory.kt:25:13Line detected, which is longer than the defined maximum line length in the code style.
22 Origami.getDatabaseInstance().greenDayModel()
23 ),
24 OrigamiSharedPreferencesRepositoryImpl(Origami.sharedPreferences!!),
25 SubmissionSharedPreferencesRepositoryImpl(Origami.sharedPreferencesForSubmission!!, Origami.liveSharedPreferencesForSubmission!!),
26 ConfigurationRepositoryImpl(
27 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
28 Origami.getDatabaseInstance().trackerConfigurationModel(),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/gdtstack/StackPagerAdapter.kt:44:9Line detected, which is longer than the defined maximum line length in the code style.
41 */
42 override fun instantiateItem(container: ViewGroup, position: Int): Any {
43 val gdtStackItem = GdtStackItem(context, container, null, greenDayTrackers[position].type!!)
44 gdtStackItem.initWith(position, dismissAction, provideView, provideUiConfiguration, cameraPermissionAction, storagePermissionAction)
45 gdtStackItem.attachLifecycleOwner(lifecycleOwner)
46 gdtStackItem.root.tag = StackViewPager.VIEWPAGER_POSITION + position
47 container.addView(gdtStackItem.root)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/gdtstack/StackPagerAdapter.kt:92:5Line detected, which is longer than the defined maximum line length in the code style.
89 POSITION_NONE
90 }
91
92 override fun destroyItem(container: ViewGroup, position: Int, viewObject: Any) = container.removeView(viewObject as View)
93
94 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/gdtstack/achievement/GdtStackAchievementFragment.kt:16:5Line detected, which is longer than the defined maximum line length in the code style.
13 import com.sharecare.realgreen.origami.presentation.base.ViewBindingFragment
14
15 class GdtStackAchievementFragment : ViewBindingFragment<FragmentGdtStackAchievementBinding>() {
16 private val viewModel: GdtStackAchievementViewModel by viewModels<GdtStackAchievementViewModelImpl> { GdtStackAchievementViewModelFactory() }
17
18 override fun initViewBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentGdtStackAchievementBinding =
19 FragmentGdtStackAchievementBinding.inflate(inflater, container, false)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/gdtstack/achievement/GdtStackAchievementViewModel.kt:48:5Line detected, which is longer than the defined maximum line length in the code style.
45
46 override val shouldNavigateToFinishScreen: NavigationLiveData = NavigationLiveData()
47
48 override fun initWithData(achievementScreenType: GdtStackAchievementFragment.AchievementScreenType, trackersToMakeGreenDay: Int?,
49 submittedTrackers: Int?, totalDueTrackers: Int?) {
50 this.achievementScreenType = achievementScreenType
51 this.trackersToMakeGreenDay = trackersToMakeGreenDay
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/gdtstack/achievement/model/AchievementUiConfiguration.kt:24:9Line detected, which is longer than the defined maximum line length in the code style.
21 DescriptionContainer(achievementScreenType, trackersToMakeGreenDay, submittedTrackers, totalDueTrackers)
22 )
23
24 fun fromIsInGreen(achievementScreenType: GdtStackAchievementFragment.AchievementScreenType) = AchievementUiConfiguration(
25 R.drawable.ic_tofu_heart_filled,
26 R.string.you_are_in_the_green,
27 DescriptionContainer(achievementScreenType, 0, 0, 0)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/gdtstack/achievement/model/AchievementUiConfiguration.kt:30:9Line detected, which is longer than the defined maximum line length in the code style.
27 DescriptionContainer(achievementScreenType, 0, 0, 0)
28 )
29
30 fun fromNoDuesIsInGreen(achievementScreenType: GdtStackAchievementFragment.AchievementScreenType) = AchievementUiConfiguration(
31 R.drawable.ic_tofu_heart_filled,
32 R.string.congratulations,
33 DescriptionContainer(achievementScreenType, 0, 0, 0)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/gdtstack/achievement/model/AchievementUiConfiguration.kt:36:9Line detected, which is longer than the defined maximum line length in the code style.
33 DescriptionContainer(achievementScreenType, 0, 0, 0)
34 )
35
36 fun fromNoDuesNoGreenDay(achievementScreenType: GdtStackAchievementFragment.AchievementScreenType, trackersToMakeGreenDay: Int) = AchievementUiConfiguration(
37 R.drawable.ic_tofu_check_positive,
38 R.string.well_done,
39 DescriptionContainer(achievementScreenType, trackersToMakeGreenDay, 0, 0)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/gdtstack/achievement/model/DescriptionContainer.kt:22:17Line detected, which is longer than the defined maximum line length in the code style.
19 */
20 fun provideDescription(resources: Resources): CharSequence =
21 when (achievementScreenType) {
22 GdtStackAchievementFragment.AchievementScreenType.NO_DUE_GREEN_DAY_SCREEN -> resources.getString(noDueIsInGreen)
23 GdtStackAchievementFragment.AchievementScreenType.NO_DUE_NO_GREEN_DAY_SCREEN -> String.format(getSupportedJavaLocale(),
24 resources.getString(noDueNoGreenDay).replace("{placeholder}", "%s"),
25 trackersToMakeGreenDay)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/gdtstack/achievement/model/DescriptionContainer.kt:23:17Line detected, which is longer than the defined maximum line length in the code style.
20 fun provideDescription(resources: Resources): CharSequence =
21 when (achievementScreenType) {
22 GdtStackAchievementFragment.AchievementScreenType.NO_DUE_GREEN_DAY_SCREEN -> resources.getString(noDueIsInGreen)
23 GdtStackAchievementFragment.AchievementScreenType.NO_DUE_NO_GREEN_DAY_SCREEN -> String.format(getSupportedJavaLocale(),
24 resources.getString(noDueNoGreenDay).replace("{placeholder}", "%s"),
25 trackersToMakeGreenDay)
26 GdtStackAchievementFragment.AchievementScreenType.GREEN_DAY_SCREEN -> resources.getString(isInGreenRes)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/gdtstack/achievement/model/DescriptionContainer.kt:27:17Line detected, which is longer than the defined maximum line length in the code style.
24 resources.getString(noDueNoGreenDay).replace("{placeholder}", "%s"),
25 trackersToMakeGreenDay)
26 GdtStackAchievementFragment.AchievementScreenType.GREEN_DAY_SCREEN -> resources.getString(isInGreenRes)
27 GdtStackAchievementFragment.AchievementScreenType.DUE_NO_GREEN_DAY_SCREEN -> String.format(getSupportedJavaLocale(),
28 resources.getString(dueNoGreenScreenRes).replace("{placeholder}", "%s"),
29 submittedTrackers, totalDueTrackers, trackersToMakeGreenDay)
30 else -> ""
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/gdtstack/itemview/GdtStackItem.kt:51:5Line detected, which is longer than the defined maximum line length in the code style.
48 val root = binding.root
49
50 private var position: Int? = null // is needed to dismiss the exact this item from the list
51 private var dismissAction: ((position: Int, delayInMillis: Long) -> Unit)? = null // the dismiss action provided from the gdt fragment
52 private var cameraPermissionAction: (() -> Unit)? = null
53 private var storagePermissionAction: (() -> Unit)? = null
54 fun initWith(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/gdtstack/itemview/GdtStackItem.kt:149:13Line detected, which is longer than the defined maximum line length in the code style.
146 TrackerSyncWorker.scheduleOneTimeTrackerSyncJob(context, id)
147 }
148 commonViewModel.activeTrackerTabId.observe(viewLifecycleOwner) { trackerTabId ->
149 val indexOfTabToSelect = commonViewModel.provideTabConfiguration()?.provideTabsToShow()?.indexOfFirst { it.id == trackerTabId }
150 binding.trackerTabs.selectTab(
151 binding.trackerTabs.getTabAt(
152 if (indexOfTabToSelect != null && indexOfTabToSelect != -1) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/gdtstack/itemview/GdtStackItem.kt:171:33Line detected, which is longer than the defined maximum line length in the code style.
168 SubmissionButtonAction.SAVE -> {
169 // we access all visible submission containers and trigger the validation.
170 // if any errors – they will be shown
171 binding.trackerInputArea.children.filter { it.isVisible }.filterIsInstance(SubmissionContainer::class.java).forEach {
172 it.showErrorsIfNeeded()
173 }
174 // we access all visible submission containers and trigger the validation.
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/gdtstack/itemview/GdtStackItem.kt:176:33Line detected, which is longer than the defined maximum line length in the code style.
173 }
174 // we access all visible submission containers and trigger the validation.
175 // if any errors are shown – we don't dismiss the card and we don't save the tracker.
176 if (binding.trackerInputArea.children.filter { it.isVisible }.filterIsInstance(SubmissionContainer::class.java).none { it.containsAnyErrors() }) {
177 // when save is clicked, we save the tracker and dismiss the card
178 commonViewModel.shouldSaveTracker.requestNavigation()
179 dismissCard()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/gdtstack/itemview/GdtStackItem.kt:182:29Line detected, which is longer than the defined maximum line length in the code style.
179 dismissCard()
180 }
181 }
182 SubmissionButtonAction.CHECK_CAMERA_PERMISSION -> commonViewModel.shouldCheckCameraPermissions.requestNavigation()
183 }
184 }
185 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/gdtstack/itemview/GdtStackItem.kt:195:29Line detected, which is longer than the defined maximum line length in the code style.
192 binding.secondaryButton.text = context.getString(actionButtonRes).substringBefore(' ')
193 binding.secondaryButton.setOnClickListener {
194 when (this) {
195 SubmissionButtonAction.CHECK_STORAGE_PERMISSION -> commonViewModel.shouldCheckStoragePermissions.requestNavigation()
196 }
197 }
198 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/gdtstack/itemview/GdtStackItem.kt:214:17Line detected, which is longer than the defined maximum line length in the code style.
211 OrigamiTrackerType.ALCOHOL,
212 OrigamiTrackerType.BLOOD_GLUCOSE,
213 OrigamiTrackerType.SMOKE -> binding.mainArea.children.filterIsInstance<BinaryConditionalView>().toList()
214 OrigamiTrackerType.WEIGHT -> binding.mainArea.children.filterIsInstance<NumericConditionalView>().toList()
215 else -> listOf<View>()
216 }
217 views.forEach {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/standalone/SubmissionFragment.kt:91:21Line detected, which is longer than the defined maximum line length in the code style.
88 val extId = arguments.getString(EXTRA_EXT_ID)
89 val valuesMap: EnumMap<TrackerMeasurement.SubmissionMeasurementType, Any> =
90 if (arguments.getSerializable(EXTRA_VALUES_MAP) is EnumMap<*, *>) {
91 arguments.getSerializable(EXTRA_VALUES_MAP) as EnumMap<TrackerMeasurement.SubmissionMeasurementType, Any>
92 } else {
93 EnumMap(TrackerMeasurement.SubmissionMeasurementType::class.java)
94 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/standalone/SubmissionFragment.kt:172:21Line detected, which is longer than the defined maximum line length in the code style.
169 }
170 commonViewModel.shouldGoBack.observe(viewLifecycleOwner) {
171 setFragmentResult(SUBMISSION_SCREEN_BUNDLE, Bundle().apply {
172 // Coming back from this fragment to the DetailsFragment may happen at the moment of the incoming Socket Message
173 // In this case the message will be lost and the Details screen won't show the results.
174 // So we set the result and will consume it on the DetailsFragment to re-fetch the data once more
175 putBoolean(SUBMISSION_SCREEN_RESULT, true)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/standalone/SubmissionFragment.kt:198:17Line detected, which is longer than the defined maximum line length in the code style.
195 }
196 // attaching the lifecycle owner to the info box of the auto trackers (if it's visible)
197 if (binding.infoBlock.isVisible) {
198 binding.infoBlock.attachLifecycleOwnerAndNavigationController(viewLifecycleOwner, getNavigationController())
199 }
200 commonViewModel.selectedDate.observe(viewLifecycleOwner) { selectedDate ->
201 commonViewModel.uiConfiguration?.let {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/standalone/SubmissionFragment.kt:224:17Line detected, which is longer than the defined maximum line length in the code style.
221 WizardIntroFragment.startFromSubmission(this.getNavigationController())
222 }
223 commonViewModel.activeTrackerTabId.observe(viewLifecycleOwner) { trackerTabId ->
224 val indexOfTabToSelect = commonViewModel.provideTabConfiguration()?.provideTabsToShow()?.indexOfFirst { it.id == trackerTabId }
225 binding.trackerTabs.selectTab(
226 binding.trackerTabs.getTabAt(
227 if (indexOfTabToSelect != null && indexOfTabToSelect != -1) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/standalone/SubmissionFragment.kt:248:37Line detected, which is longer than the defined maximum line length in the code style.
245 SubmissionButtonAction.SAVE, SubmissionButtonAction.UPDATE -> {
246 // we access all visible submission containers and trigger the validation.
247 // if any errors – they will be shown
248 binding.trackerInputArea.children.filter { it.isVisible }.filterIsInstance(SubmissionContainer::class.java).forEach {
249 it.showErrorsIfNeeded()
250 }
251 // we access all visible submission containers and trigger the validation.
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/standalone/SubmissionFragment.kt:253:37Line detected, which is longer than the defined maximum line length in the code style.
250 }
251 // we access all visible submission containers and trigger the validation.
252 // if any errors are shown – we don't save the tracker
253 if (binding.trackerInputArea.children.filter { it.isVisible }.filterIsInstance(SubmissionContainer::class.java)
254 .none { it.containsAnyErrors() }
255 ) {
256 TrackerAnalytics.reportTrackerSaveEntriesAction(binding.title.text.toString())
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/standalone/SubmissionFragment.kt:260:33Line detected, which is longer than the defined maximum line length in the code style.
257 vmAccessor.commonViewModel.shouldSaveTracker.requestNavigation()
258 }
259 }
260 SubmissionButtonAction.CHECK_CAMERA_PERMISSION -> vmAccessor.commonViewModel.shouldCheckCameraPermissions.requestNavigation()
261 else -> {} // other SubmissionButtonActions are not supported by primaryActionButton
262 }
263 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/standalone/SubmissionFragment.kt:270:33Line detected, which is longer than the defined maximum line length in the code style.
267 setText(trackerTab.submissionSecondaryButtonAction.actionButtonRes)
268 setOnClickListener {
269 when (trackerTab.submissionSecondaryButtonAction) {
270 SubmissionButtonAction.CHECK_STORAGE_PERMISSION -> vmAccessor.commonViewModel.shouldCheckStoragePermissions.requestNavigation()
271 else -> {} // other SubmissionButtonActions are not supported by secondaryActionButton
272 }
273 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/standalone/SubmissionFragment.kt:315:21Line detected, which is longer than the defined maximum line length in the code style.
312 binding.trackerTabs.addOnTabSelectedListener(object : TabLayout.OnTabSelectedListener {
313 override fun onTabSelected(tab: TabLayout.Tab?) {
314 tab?.let { tab ->
315 vmAccessor.commonViewModel.updateActiveTrackerTabId(trackerTabs.map { it.id }.first { id -> id == tab.tag })
316 trackerTabs.map { it.id }.forEach { id ->
317 binding.trackerInputArea.findViewWithTag<ViewGroup>(id)?.isVisible = id == tab.tag
318 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/standalone/SubmissionFragment.kt:330:9Line detected, which is longer than the defined maximum line length in the code style.
327 }
328
329 private fun setupQuestionVisibility(trackerTabs: List<TrackerTab>) {
330 binding.question.visibility = if (trackerTabs.size == 1 && trackerTabs.any { it.id == TrackerTabId.STRESS_VOICE }) {
331 View.GONE
332 } else {
333 View.VISIBLE
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/standalone/SubmissionFragment.kt:389:13Line detected, which is longer than the defined maximum line length in the code style.
386
387 private fun checkCameraPermissionsOnResult() {
388 when (origamiTrackerType) {
389 OrigamiTrackerType.DIET -> provideTrackerInputAreaChildOfClass(DietCameraInfoView::class.java)?.checkCameraPermissionsOnResult(this)
390 else -> {} // method is not supported for other tracker types
391 }
392 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/standalone/SubmissionFragment.kt:396:13Line detected, which is longer than the defined maximum line length in the code style.
393
394 private fun checkStoragePermissionsOnResult() {
395 when (origamiTrackerType) {
396 OrigamiTrackerType.DIET -> provideTrackerInputAreaChildOfClass(DietCameraInfoView::class.java)?.checkStoragePermissionsOnResult(this)
397 else -> {} // method is not supported for other tracker types
398 }
399 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/standalone/passio/PassioFragment.kt:195:21Line detected, which is longer than the defined maximum line length in the code style.
192 )
193 binding.instruction.setText(
194 if (foodSuggestions.isNullOrEmpty()) {
195 if (arguments?.getSerializable(EXTRA_INITIAL_ACTION) as? InitialAction == InitialAction.OPEN_CAMERA) {
196 R.string.diet_subtitle_failure_camera
197 } else {
198 R.string.diet_subtitle_failure_gallery
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/standalone/passio/PassioViewModel.kt:43:6Line detected, which is longer than the defined maximum line length in the code style.
40 )
41
42 /**
43 * Once a user takes a photo and confirms it, the Uri that holds it is moved from "allocatedPhotoUri" to "capturedPhotoUri"
44 * And "allocatedPhotoUri" gets a new uri in case a user wants to retake a photo.
45 */
46 fun shiftToCapturedUriAndAllocate(allocatedPhotoUri: Uri)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/standalone/passio/PassioViewModel.kt:181:9Line detected, which is longer than the defined maximum line length in the code style.
178
179 private var selectedDate: DateTime = DateTime.now()
180 private fun anyLegacyTrackerToDelete(): Boolean =
181 greenDayRepository.getGreenDaySynchronously(selectedDate.toTrackerDateString())?.getTrackerOfType(OrigamiTrackerType.DIET.name)?.isLegacy() == true
182
183 override fun initWithArgs(
184 allocatedPhotoUri: Uri,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/standalone/passio/PassioViewModel.kt:287:17Line detected, which is longer than the defined maximum line length in the code style.
284 isInProgress = true
285 trackerRepository.submitTrackerMs(
286 null, selectedDate, provideTrackerMsOrNull()!!,
287 TrackerRepositoryImpl.DeletionPolicyOfLegacyTrackers.fromSubmissionParams(anyLegacyTrackerToDelete(), OrigamiTrackerType.DIET)
288 ) {
289 // we post an id of the TrackerMs to be synced
290 _idForJobScheduler.postValue(it)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/standalone/passio/PassioViewModel.kt:293:17Line detected, which is longer than the defined maximum line length in the code style.
290 _idForJobScheduler.postValue(it)
291 // finally we request to go to the previous screen
292 isInProgress = false
293 sharedPreferencesRepository.removeDashboardLastUpdatedMoment() // so that once we return to the dashboard it would trigger an update
294 _suggestions.value = null
295 when (initialAction.value) {
296 InitialAction.OPEN_CAMERA -> shouldOpenCamera.requestNavigation()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/standalone/passio/PassioViewModel.kt:309:17Line detected, which is longer than the defined maximum line length in the code style.
306 isInProgress = true
307 trackerRepository.submitTrackerMs(
308 null, selectedDate, provideTrackerMsOrNull()!!,
309 TrackerRepositoryImpl.DeletionPolicyOfLegacyTrackers.fromSubmissionParams(anyLegacyTrackerToDelete(), OrigamiTrackerType.DIET)
310 ) {
311 // we post an id of the TrackerMs to be synced
312 _idForJobScheduler.postValue(it)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/standalone/passio/PassioViewModel.kt:315:17Line detected, which is longer than the defined maximum line length in the code style.
312 _idForJobScheduler.postValue(it)
313 // finally we request to go to the previous screen
314 isInProgress = false
315 sharedPreferencesRepository.removeDashboardLastUpdatedMoment() // so that once we return to the dashboard it would trigger an update
316 capturedPhotoUri?.let { photo ->
317 submissionSharedPreferencesRepository.setDietImageWithLabel(
318 Pair(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/standalone/passio/PassioViewModel.kt:372:9Line detected, which is longer than the defined maximum line length in the code style.
369 private fun setAnalyseSuccess(passioIds: MutableList<PassioID>) {
370 val suggestionsToPost = passioIds.distinct().map {
371 FoodSuggestion(it, PassioSDK.instance.lookupNameFor(it) ?: "")
372 }.filter { it.foodTitle.isNotEmpty() && it.foodId != "BKG0001" } // filtering BKG0001 comes from Passio SDK example code
373 foodSuggestionSelected = suggestionsToPost.firstOrNull()
374 _suggestions.value = suggestionsToPost
375 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/submission/view/standalone/passio/PassioViewModel.kt:382:9Line detected, which is longer than the defined maximum line length in the code style.
379 }
380
381 private fun provideTrackerMsOrNull(): Tracker? = if (foodSuggestionSelected != null) {
382 DietTracker.createFromCamera(selectedDate, foodSuggestionSelected!!.foodId, PassioSDK.instance.lookupNameFor(foodSuggestionSelected!!.foodId) ?: "")
383 } else {
384 null
385 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/widget/calendar/presentation/calendar/ui/LegendItem.kt:34:10Line detected, which is longer than the defined maximum line length in the code style.
31 )
32
33 /**
34 * Returns a list of weekday names in a narrow format starting from the first day of the week for the current locale
35 * Ex. for en_US: "S", "M", "T", "W", "T", "F", "S"
36 */
37 private fun getDays(): Array<String?> {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/widget/calendar/presentation/calendar/ui/LegendItem.kt:58:21Line detected, which is longer than the defined maximum line length in the code style.
55 val shortName = calendar.getDisplayName(Calendar.DAY_OF_WEEK, Calendar.SHORT,
56 getSupportedJavaLocale())
57 //For Chinese language we want to take the second letter from the short style
58 if (shortName != null && shortName.length >= 2 && getSupportedJavaLocale().language == Locale.CHINESE.language) {
59 shortName.toCharArray()[1].toString()
60 } else {
61 shortName!!.toCharArray()[0].toString()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/widget/calendar/presentation/calendar/ui/LegendItem.kt:74:13Line detected, which is longer than the defined maximum line length in the code style.
71 private var textView: TextView? = null
72 fun layout(parent: LinearLayout, resProvider: ResProvider): View? {
73 if (textView == null) {
74 textView = LayoutInflater.from(parent.context).inflate(R.layout.scrollcalendar_day_legend, parent, false) as TextView?
75 val typedArray = textView!!.context.theme.obtainStyledAttributes(resProvider.legendItemStyle, attrs)
76 for (i in attrs.indices) {
77 when (attrs[i]) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/widget/calendar/presentation/calendar/ui/LegendItem.kt:78:21Line detected, which is longer than the defined maximum line length in the code style.
75 val typedArray = textView!!.context.theme.obtainStyledAttributes(resProvider.legendItemStyle, attrs)
76 for (i in attrs.indices) {
77 when (attrs[i]) {
78 android.R.attr.textColor -> textView!!.setTextColor(typedArray.getColor(i, ContextCompat.getColor(textView!!.context, R.color.black)))
79 android.R.attr.textSize -> textView!!.setTextSize(TypedValue.COMPLEX_UNIT_PX, typedArray.getDimensionPixelSize(i, 16).toFloat())
80 android.R.attr.gravity -> textView!!.gravity = typedArray.getInt(i, Gravity.CENTER)
81 android.R.attr.padding -> {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/widget/calendar/presentation/calendar/ui/LegendItem.kt:79:21Line detected, which is longer than the defined maximum line length in the code style.
76 for (i in attrs.indices) {
77 when (attrs[i]) {
78 android.R.attr.textColor -> textView!!.setTextColor(typedArray.getColor(i, ContextCompat.getColor(textView!!.context, R.color.black)))
79 android.R.attr.textSize -> textView!!.setTextSize(TypedValue.COMPLEX_UNIT_PX, typedArray.getDimensionPixelSize(i, 16).toFloat())
80 android.R.attr.gravity -> textView!!.gravity = typedArray.getInt(i, Gravity.CENTER)
81 android.R.attr.padding -> {
82 val padding = typedArray.getDimensionPixelOffset(i, 0)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/widget/calendar/presentation/calendar/ui/ScrollCalendar.kt:74:17Line detected, which is longer than the defined maximum line length in the code style.
71
72 private fun initStyle(context: Context, attrs: AttributeSet?) {
73 val typedArray = context
74 .obtainStyledAttributes(attrs, R.styleable.ScrollCalendar, R.attr.scrollCalendarStyleAttr, R.style.ScrollCalendarStyle)
75 selectedDayStyle = typedArray.getResourceId(R.styleable.ScrollCalendar_selectedItemStyle, 0)
76 defaultAdapter = typedArray.getInt(Keys.ADAPTER, Defaults.ADAPTER)
77 _customFont = typedArray.getString(Keys.CUSTOM_FONT)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/widget/calendar/presentation/calendar/ui/ScrollCalendar.kt:172:5Line detected, which is longer than the defined maximum line length in the code style.
169 return adapter!!
170 }
171
172 fun getFirstVisibleMonth(): CalendarMonth? = if (adapter == null || layoutManager == null) null else adapter!!.getItem(layoutManager!!.findFirstVisibleItemPosition())
173 fun getLastVisibleMonth(): CalendarMonth? = if (adapter == null || layoutManager == null) null else adapter!!.getItem(layoutManager!!.findLastVisibleItemPosition())
174
175 fun getFirstMonthToLoad(): Calendar? =
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/widget/calendar/presentation/calendar/ui/ScrollCalendar.kt:173:5Line detected, which is longer than the defined maximum line length in the code style.
170 }
171
172 fun getFirstVisibleMonth(): CalendarMonth? = if (adapter == null || layoutManager == null) null else adapter!!.getItem(layoutManager!!.findFirstVisibleItemPosition())
173 fun getLastVisibleMonth(): CalendarMonth? = if (adapter == null || layoutManager == null) null else adapter!!.getItem(layoutManager!!.findLastVisibleItemPosition())
174
175 fun getFirstMonthToLoad(): Calendar? =
176 if (adapter != null && getFirstVisibleMonth() != null && getLastVisibleMonth() != null) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/widget/calendar/presentation/calendar/ui/ScrollCalendar.kt:180:17Line detected, which is longer than the defined maximum line length in the code style.
177 val fromCalendar = Calendar.getInstance()
178 fromCalendar.set(getFirstVisibleMonth()!!.year, getFirstVisibleMonth()!!.month, 1)
179 val toCalendar = Calendar.getInstance()
180 toCalendar.set(getLastVisibleMonth()!!.year, getLastVisibleMonth()!!.month, toCalendar.getActualMaximum(Calendar.DAY_OF_MONTH))
181 while (fromCalendar.before(toCalendar) && getAdapter().areItemsExistForMonthAndYear(fromCalendar)) {
182 fromCalendar.add(Calendar.MONTH, 1)
183 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/widget/calendar/presentation/calendar/ui/ScrollCalendar.kt:189:5Line detected, which is longer than the defined maximum line length in the code style.
186 null
187 }
188
189 fun getLastMonthToLoad(): Calendar? = if (adapter != null && getFirstVisibleMonth() != null && getLastVisibleMonth() != null) {
190 val fromCalendar = Calendar.getInstance()
191 fromCalendar.set(getFirstVisibleMonth()!!.year, getFirstVisibleMonth()!!.month, 1)
192 val toCalendar = Calendar.getInstance()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/widget/calendar/presentation/calendar/ui/ScrollCalendar.kt:193:9Line detected, which is longer than the defined maximum line length in the code style.
190 val fromCalendar = Calendar.getInstance()
191 fromCalendar.set(getFirstVisibleMonth()!!.year, getFirstVisibleMonth()!!.month, 1)
192 val toCalendar = Calendar.getInstance()
193 toCalendar.set(getLastVisibleMonth()!!.year, getLastVisibleMonth()!!.month, toCalendar.getActualMaximum(Calendar.DAY_OF_MONTH))
194 while (toCalendar.after(fromCalendar) && getAdapter().areItemsExistForMonthAndYear(toCalendar)) {
195 toCalendar.add(Calendar.MONTH, -1)
196 toCalendar[Calendar.DAY_OF_MONTH] = toCalendar.getActualMaximum(Calendar.DAY_OF_MONTH)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/widget/calendar/presentation/calendar/ui/ScrollCalendar.kt:237:6Line detected, which is longer than the defined maximum line length in the code style.
234 override var dayStyle: Int = 0
235
236 /**
237 * A default calendar scroll listener that limits available months between the current month and the month of the startFromDate
238 */
239 fun setDefaultCalendarScrollListener(startFromDate: DateTime) = this.setCalendarScrollListener(object : CalendarScrollListener {
240 override fun shouldAddNextMonth(lastDisplayedYear: Int, lastDisplayedMonth: Int): Boolean {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/widget/calendar/presentation/calendar/ui/ScrollCalendar.kt:239:5Line detected, which is longer than the defined maximum line length in the code style.
236 /**
237 * A default calendar scroll listener that limits available months between the current month and the month of the startFromDate
238 */
239 fun setDefaultCalendarScrollListener(startFromDate: DateTime) = this.setCalendarScrollListener(object : CalendarScrollListener {
240 override fun shouldAddNextMonth(lastDisplayedYear: Int, lastDisplayedMonth: Int): Boolean {
241 return lastDisplayedYear < DateTime.now().year ||
242 (lastDisplayedYear == DateTime.now().year &&
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/widget/calendar/presentation/calendar/ui/ScrollCalendarAdapter.kt:20:29Line detected, which is longer than the defined maximum line length in the code style.
17 // the adapter that holds the months as items for the calendar
18 // fork of https://github.com/RafalManka/ScrollCalendar
19 class ScrollCalendarAdapter(private val monthResProvider: MonthResProvider,
20 private val dayResProvider: DayResProvider) : RecyclerView.Adapter<MonthViewHolder?>(), DayClickCallback {
21 private val months: MutableList<CalendarMonth> = ArrayList()
22 private var recyclerView: RecyclerView? = null
23 var calendarScrollListener: CalendarScrollListener? = null
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/widget/calendar/presentation/day/ui/DayHolder.kt:40:5Line detected, which is longer than the defined maximum line length in the code style.
37 return linearLayout
38 }
39
40 fun display(calendarMonth: CalendarMonth?, currentDay: CalendarDay?, previousDay: CalendarDay?, nextDay: CalendarDay?, itemsValue: Int) {
41 this.calendarMonth = calendarMonth
42 this.currentDay = currentDay
43 setupVisibility(currentDay, itemsValue)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/widget/calendar/presentation/month/style/MonthResProvider.kt:57:17Line detected, which is longer than the defined maximum line length in the code style.
54 val typedArray = context.theme.obtainStyledAttributes(resProvider.monthTitleStyle, attrs)
55 for (i in attrs.indices) {
56 when (attrs[i]) {
57 android.R.attr.textColor -> textColor = typedArray.getColor(i, ContextCompat.getColor(context, R.color.black))
58 android.R.attr.textSize -> textSize = typedArray.getDimensionPixelSize(i, 12)
59 android.R.attr.gravity -> gravity = typedArray.getInt(i, Gravity.START)
60 android.R.attr.textAllCaps -> textAllCaps = typedArray.getBoolean(i, false)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/widget/calendar/presentation/month/ui/MonthViewHolder.kt:28:5Line detected, which is longer than the defined maximum line length in the code style.
25 private val weeks: Array<WeekHolder?> = arrayOfNulls(7)
26 private var textAllCaps = false
27
28 private constructor(rootView: View, calendarCallback: DayClickCallback, monthResProvider: MonthResProvider, dayResProvider: DayResProvider) : super(rootView) {
29 this.monthResProvider = monthResProvider
30 val monthContainer = rootView.findViewById<LinearLayout>(R.id.monthContainer)
31 title = rootView.findViewById(R.id.title)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/widget/calendar/presentation/month/ui/MonthViewHolder.kt:56:13Line detected, which is longer than the defined maximum line length in the code style.
53
54 fun bind(month: CalendarMonth, itemsData: Map<String, Int>?) {
55 if (title != null) {
56 val txt: String = if (monthResProvider != null && monthResProvider!!.showYearAlways()) month.monthNameWithYear else month.readableMonthName
57 title.text = applyCase(txt)
58 }
59 for (i in weeks.indices) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/widget/calendar/presentation/month/ui/MonthViewHolder.kt:89:9Line detected, which is longer than the defined maximum line length in the code style.
86 }
87
88 companion object {
89 fun create(parent: ViewGroup, calendarCallback: DayClickCallback, resProvider: MonthResProvider, dayResProvider: DayResProvider): MonthViewHolder {
90 return MonthViewHolder(
91 LayoutInflater.from(parent.context).inflate(R.layout.scrollcalendar_month, parent, false),
92 calendarCallback, resProvider, dayResProvider)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/wizard/WizardAutoTrackingFragment.kt:29:5Line detected, which is longer than the defined maximum line length in the code style.
26 class WizardAutoTrackingFragment : ViewBindingFragment<FragmentWizardAutoTrackingBinding>() {
27 private val wizardViewModel: WizardViewModel by viewModels<WizardViewModelImpl> { WizardViewModelFactory() }
28
29 private val autoTrackingViewModel: AutoTrackingViewModel by viewModels<AutoTrackingViewModelImpl> { AutoTrackingViewModelFactory() }
30
31 override fun initViewBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentWizardAutoTrackingBinding =
32 FragmentWizardAutoTrackingBinding.inflate(inflater, container, false)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/wizard/WizardExternalSourceFragment.kt:109:9Line detected, which is longer than the defined maximum line length in the code style.
106
107
108 private fun initSourcesObservers() {
109 // If the Google Fit authorization is requested, we request one of three possible pages depending on the conditions
110 sourcesViewModel.shouldNavigateToGoogleFitSetup.observe(viewLifecycleOwner) {
111 with(sourcesViewModel) {
112 when {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/wizard/WizardExternalSourceFragment.kt:322:21Line detected, which is longer than the defined maximum line length in the code style.
319 }
320 else -> {
321 // In case of an error, we clean the token extra
322 // (it could stay there in teh case of a user connected some other external source before Google Fit)
323 // and we request an error screen to be shown.
324 requireActivity().intent.removeExtra(SettingsFragment.EXTRA_SOURCE_TOKEN)
325 sourcesViewModel.shouldNavigateToGoogleFitError.requestNavigation()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/wizard/WizardExternalSourceFragment.kt:334:17Line detected, which is longer than the defined maximum line length in the code style.
331 // In this case we get here and request the authorization screen of the source that needs to be linked.
332 when (data.getSerializableExtra(SettingsFragment.EXTRA_SOURCE_TYPE) as? Source.SourceType) {
333 Source.SourceType.FITBIT -> sourcesViewModel.shouldNavigateToAuthorizationForFitbit.requestNavigation()
334 Source.SourceType.SAMSUNG -> sourcesViewModel.shouldNavigateToAuthorizationForSamsung.requestNavigation()
335 Source.SourceType.GOOGLE_FIT -> sourcesViewModel.shouldNavigateToGoogleFitSetup.requestNavigation()
336 else -> {
337 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/wizard/WizardIntroFragment.kt:66:9Line detected, which is longer than the defined maximum line length in the code style.
63 companion object {
64 private const val WIZARD_TYPE = "wizard_type"
65
66 fun startFromSettings(navigationController: NavigationController) = start(navigationController, WizardType.SETTINGS, false)
67
68 fun startFromSubmission(navigationController: NavigationController) = start(navigationController, WizardType.SUBMISSION, false)
69
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/wizard/WizardIntroFragment.kt:68:9Line detected, which is longer than the defined maximum line length in the code style.
65
66 fun startFromSettings(navigationController: NavigationController) = start(navigationController, WizardType.SETTINGS, false)
67
68 fun startFromSubmission(navigationController: NavigationController) = start(navigationController, WizardType.SUBMISSION, false)
69
70 fun startFromDashboard(navigationController: NavigationController) = start(navigationController, WizardType.DASHBOARD)
71
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/wizard/WizardIntroFragment.kt:70:9Line detected, which is longer than the defined maximum line length in the code style.
67
68 fun startFromSubmission(navigationController: NavigationController) = start(navigationController, WizardType.SUBMISSION, false)
69
70 fun startFromDashboard(navigationController: NavigationController) = start(navigationController, WizardType.DASHBOARD)
71
72 private fun start(navigationController: NavigationController, wizardType: WizardType?, replaceInContainer: Boolean = true) {
73 val targetFragment: Fragment = WizardIntroFragment().apply {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/wizard/WizardIntroFragment.kt:72:9Line detected, which is longer than the defined maximum line length in the code style.
69
70 fun startFromDashboard(navigationController: NavigationController) = start(navigationController, WizardType.DASHBOARD)
71
72 private fun start(navigationController: NavigationController, wizardType: WizardType?, replaceInContainer: Boolean = true) {
73 val targetFragment: Fragment = WizardIntroFragment().apply {
74 arguments = Bundle().apply {
75 putSerializable(WIZARD_TYPE, wizardType)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/wizard/WizardViewModel.kt:41:27Line detected, which is longer than the defined maximum line length in the code style.
38 }
39
40 class WizardViewModelImpl(private val userSettingsRepository: UserSettingsRepository,
41 private val origamiSharedPreferencesRepository: OrigamiSharedPreferencesRepository) : ViewModel(), WizardViewModel {
42
43 private var wizardType: WizardType? = null
44
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/presentation/wizard/WizardViewModelFactory.kt:15:17Line detected, which is longer than the defined maximum line length in the code style.
12 @Suppress("UNCHECKED_CAST")
13 override fun <T : ViewModel> create(modelClass: Class<T>): T {
14 return WizardViewModelImpl(
15 UserSettingsRepositoryImpl(ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.USER_SETTINGS) as UserSettingsService,
16 OrigamiSharedPreferencesRepositoryImpl(Origami.sharedPreferences!!)),
17 OrigamiSharedPreferencesRepositoryImpl(Origami.sharedPreferences!!)) as T
18 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/reminders/OrigamiAlarmReceivers.kt:59:9Line detected, which is longer than the defined maximum line length in the code style.
56 }
57
58 private fun restartTimer(context: Context, reminderType: OrigamiReminderUtil.ReminderType) {
59 val sharedPreferencesRepository: OrigamiSharedPreferencesRepository = OrigamiSharedPreferencesRepositoryImpl(Origami.getSharedPreferencesExternal(context))
60 when (reminderType) {
61 OrigamiReminderUtil.ReminderType.DAILY_TRACKING ->
62 if (sharedPreferencesRepository.isDailyTrackingReminderOn()) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/reminders/OrigamiAlarmReceivers.kt:96:9Line detected, which is longer than the defined maximum line length in the code style.
93 }
94
95 private fun snoozeTimer(context: Context, reminderType: OrigamiReminderUtil.ReminderType) {
96 val sharedPreferencesRepository: OrigamiSharedPreferencesRepository = OrigamiSharedPreferencesRepositoryImpl(Origami.getSharedPreferencesExternal(context))
97 val triggerTime = SystemClock.elapsedRealtime() + SNOOZE_MINUTES * DateUtil.MINUTE_IN_MILLIS
98 when (reminderType) {
99 OrigamiReminderUtil.ReminderType.DAILY_TRACKING ->
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/reminders/OrigamiNotificationTrackerUtil.kt:23:1Line detected, which is longer than the defined maximum line length in the code style.
20 * Please update the following document if this file is modified
21 * https://arnoldmedia.jira.com/wiki/spaces/SCB/pages/2994470924/Core+Components+documentation?focusedCommentId=3001483282#comment-3001483282
22 */
23 @Utility(msg = "Util class for notifications like dailytracking, medication ,sleep etc.", type = UtilityType.Notifications)
24 object OrigamiNotificationTrackerUtil {
25 /**
26 * Shows a daily tracking reminder notification
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/reminders/OrigamiNotificationTrackerUtil.kt:42:13Line detected, which is longer than the defined maximum line length in the code style.
39 setContentIntent(pendingIntentToTrackerPage)
40 setContentTitle(context.getString(R.string.origami_notification_daily_tracking_reminder_title))
41 setContentText(context.getString(R.string.origami_notification_daily_tracking_reminder_content))
42 setStyle(NotificationCompat.BigTextStyle().bigText(context.getString(R.string.origami_notification_daily_tracking_reminder_content)))
43 addAction(0, context.getString(R.string.origami_notification_action_dismiss), getDismissIntent(context, NotificationCoreUtils.ORIGAMI_DAILY_TRACKING_REMINDER_ID))
44 addAction(0, context.getString(R.string.origami_notification_action_snooze), getSnoozeIntent(context, NotificationCoreUtils.ORIGAMI_DAILY_TRACKING_REMINDER_ID))
45 addAction(0, context.getString(R.string.add_entry), pendingIntentToTrackerPage)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/reminders/OrigamiNotificationTrackerUtil.kt:43:13Line detected, which is longer than the defined maximum line length in the code style.
40 setContentTitle(context.getString(R.string.origami_notification_daily_tracking_reminder_title))
41 setContentText(context.getString(R.string.origami_notification_daily_tracking_reminder_content))
42 setStyle(NotificationCompat.BigTextStyle().bigText(context.getString(R.string.origami_notification_daily_tracking_reminder_content)))
43 addAction(0, context.getString(R.string.origami_notification_action_dismiss), getDismissIntent(context, NotificationCoreUtils.ORIGAMI_DAILY_TRACKING_REMINDER_ID))
44 addAction(0, context.getString(R.string.origami_notification_action_snooze), getSnoozeIntent(context, NotificationCoreUtils.ORIGAMI_DAILY_TRACKING_REMINDER_ID))
45 addAction(0, context.getString(R.string.add_entry), pendingIntentToTrackerPage)
46 notify(context, build(), NotificationCoreUtils.ORIGAMI_DAILY_TRACKING_REMINDER_ID)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/reminders/OrigamiNotificationTrackerUtil.kt:44:13Line detected, which is longer than the defined maximum line length in the code style.
41 setContentText(context.getString(R.string.origami_notification_daily_tracking_reminder_content))
42 setStyle(NotificationCompat.BigTextStyle().bigText(context.getString(R.string.origami_notification_daily_tracking_reminder_content)))
43 addAction(0, context.getString(R.string.origami_notification_action_dismiss), getDismissIntent(context, NotificationCoreUtils.ORIGAMI_DAILY_TRACKING_REMINDER_ID))
44 addAction(0, context.getString(R.string.origami_notification_action_snooze), getSnoozeIntent(context, NotificationCoreUtils.ORIGAMI_DAILY_TRACKING_REMINDER_ID))
45 addAction(0, context.getString(R.string.add_entry), pendingIntentToTrackerPage)
46 notify(context, build(), NotificationCoreUtils.ORIGAMI_DAILY_TRACKING_REMINDER_ID)
47 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/reminders/OrigamiNotificationTrackerUtil.kt:67:13Line detected, which is longer than the defined maximum line length in the code style.
64 setContentIntent(pendingIntentToTrackerPage)
65 setContentTitle(context.getString(R.string.origami_notification_medication_reminder_title))
66 setContentText(context.getString(R.string.origami_notification_medication_reminder_content))
67 setStyle(NotificationCompat.BigTextStyle().bigText(context.getString(R.string.origami_notification_medication_reminder_content)))
68 addAction(0, context.getString(R.string.origami_notification_action_dismiss), getDismissIntent(context, NotificationCoreUtils.ORIGAMI_MEDICATION_REMINDER_ID))
69 addAction(0, context.getString(R.string.origami_notification_action_snooze), getSnoozeIntent(context, NotificationCoreUtils.ORIGAMI_MEDICATION_REMINDER_ID))
70 addAction(0, context.getString(R.string.add_entry), pendingIntentToTrackerPage)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/reminders/OrigamiNotificationTrackerUtil.kt:68:13Line detected, which is longer than the defined maximum line length in the code style.
65 setContentTitle(context.getString(R.string.origami_notification_medication_reminder_title))
66 setContentText(context.getString(R.string.origami_notification_medication_reminder_content))
67 setStyle(NotificationCompat.BigTextStyle().bigText(context.getString(R.string.origami_notification_medication_reminder_content)))
68 addAction(0, context.getString(R.string.origami_notification_action_dismiss), getDismissIntent(context, NotificationCoreUtils.ORIGAMI_MEDICATION_REMINDER_ID))
69 addAction(0, context.getString(R.string.origami_notification_action_snooze), getSnoozeIntent(context, NotificationCoreUtils.ORIGAMI_MEDICATION_REMINDER_ID))
70 addAction(0, context.getString(R.string.add_entry), pendingIntentToTrackerPage)
71 notify(context, build(), NotificationCoreUtils.ORIGAMI_MEDICATION_REMINDER_ID)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/reminders/OrigamiNotificationTrackerUtil.kt:69:13Line detected, which is longer than the defined maximum line length in the code style.
66 setContentText(context.getString(R.string.origami_notification_medication_reminder_content))
67 setStyle(NotificationCompat.BigTextStyle().bigText(context.getString(R.string.origami_notification_medication_reminder_content)))
68 addAction(0, context.getString(R.string.origami_notification_action_dismiss), getDismissIntent(context, NotificationCoreUtils.ORIGAMI_MEDICATION_REMINDER_ID))
69 addAction(0, context.getString(R.string.origami_notification_action_snooze), getSnoozeIntent(context, NotificationCoreUtils.ORIGAMI_MEDICATION_REMINDER_ID))
70 addAction(0, context.getString(R.string.add_entry), pendingIntentToTrackerPage)
71 notify(context, build(), NotificationCoreUtils.ORIGAMI_MEDICATION_REMINDER_ID)
72 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/reminders/OrigamiNotificationTrackerUtil.kt:91:13Line detected, which is longer than the defined maximum line length in the code style.
88 NotificationCoreUtils.ORIGAMI_SLEEP_REMINDER_ID))
89 setContentTitle(context.getString(R.string.notification_sleep_reminder_title))
90 setContentText(context.getString(R.string.origami_notification_sleep_reminder_content))
91 setStyle(NotificationCompat.BigTextStyle().bigText(context.getString(R.string.origami_notification_sleep_reminder_content)))
92 addAction(0, context.getString(R.string.origami_notification_action_dismiss), getDismissIntent(context, NotificationCoreUtils.ORIGAMI_SLEEP_REMINDER_ID))
93 addAction(0, context.getString(R.string.origami_notification_action_snooze), getSnoozeIntent(context, NotificationCoreUtils.ORIGAMI_SLEEP_REMINDER_ID))
94 addAction(0, context.getString(R.string.origami_notification_action_reschedule), getPendingIntent(context, makeIntent(SettingsFragment::class.java, null, context),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/reminders/OrigamiNotificationTrackerUtil.kt:92:13Line detected, which is longer than the defined maximum line length in the code style.
89 setContentTitle(context.getString(R.string.notification_sleep_reminder_title))
90 setContentText(context.getString(R.string.origami_notification_sleep_reminder_content))
91 setStyle(NotificationCompat.BigTextStyle().bigText(context.getString(R.string.origami_notification_sleep_reminder_content)))
92 addAction(0, context.getString(R.string.origami_notification_action_dismiss), getDismissIntent(context, NotificationCoreUtils.ORIGAMI_SLEEP_REMINDER_ID))
93 addAction(0, context.getString(R.string.origami_notification_action_snooze), getSnoozeIntent(context, NotificationCoreUtils.ORIGAMI_SLEEP_REMINDER_ID))
94 addAction(0, context.getString(R.string.origami_notification_action_reschedule), getPendingIntent(context, makeIntent(SettingsFragment::class.java, null, context),
95 NotificationCoreUtils.ORIGAMI_SLEEP_SETTING_REMINDER_ID))
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/reminders/OrigamiNotificationTrackerUtil.kt:93:13Line detected, which is longer than the defined maximum line length in the code style.
90 setContentText(context.getString(R.string.origami_notification_sleep_reminder_content))
91 setStyle(NotificationCompat.BigTextStyle().bigText(context.getString(R.string.origami_notification_sleep_reminder_content)))
92 addAction(0, context.getString(R.string.origami_notification_action_dismiss), getDismissIntent(context, NotificationCoreUtils.ORIGAMI_SLEEP_REMINDER_ID))
93 addAction(0, context.getString(R.string.origami_notification_action_snooze), getSnoozeIntent(context, NotificationCoreUtils.ORIGAMI_SLEEP_REMINDER_ID))
94 addAction(0, context.getString(R.string.origami_notification_action_reschedule), getPendingIntent(context, makeIntent(SettingsFragment::class.java, null, context),
95 NotificationCoreUtils.ORIGAMI_SLEEP_SETTING_REMINDER_ID))
96 notify(context, build(), NotificationCoreUtils.ORIGAMI_SLEEP_REMINDER_ID)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/reminders/OrigamiNotificationTrackerUtil.kt:94:13Line detected, which is longer than the defined maximum line length in the code style.
91 setStyle(NotificationCompat.BigTextStyle().bigText(context.getString(R.string.origami_notification_sleep_reminder_content)))
92 addAction(0, context.getString(R.string.origami_notification_action_dismiss), getDismissIntent(context, NotificationCoreUtils.ORIGAMI_SLEEP_REMINDER_ID))
93 addAction(0, context.getString(R.string.origami_notification_action_snooze), getSnoozeIntent(context, NotificationCoreUtils.ORIGAMI_SLEEP_REMINDER_ID))
94 addAction(0, context.getString(R.string.origami_notification_action_reschedule), getPendingIntent(context, makeIntent(SettingsFragment::class.java, null, context),
95 NotificationCoreUtils.ORIGAMI_SLEEP_SETTING_REMINDER_ID))
96 notify(context, build(), NotificationCoreUtils.ORIGAMI_SLEEP_REMINDER_ID)
97 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/reminders/OrigamiReminderUtil.kt:26:17Line detected, which is longer than the defined maximum line length in the code style.
23 AlarmManager.RTC_WAKEUP,
24 timeInMillis,
25 AlarmManager.INTERVAL_DAY,
26 PendingIntent.getBroadcast(context, 0, Intent(context, OrigamiDailyTrackingAlarmReceiver::class.java), PendingIntent.FLAG_IMMUTABLE))
27 }
28
29 @JvmStatic
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/reminders/OrigamiReminderUtil.kt:35:17Line detected, which is longer than the defined maximum line length in the code style.
32 context.getSystemService(Context.ALARM_SERVICE) as AlarmManager,
33 AlarmManager.ELAPSED_REALTIME_WAKEUP,
34 timeInMillis,
35 PendingIntent.getBroadcast(context, 0, Intent(context, OrigamiDailyTrackingAlarmReceiver::class.java), PendingIntent.FLAG_IMMUTABLE))
36 }
37
38 @JvmStatic
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/reminders/OrigamiReminderUtil.kt:41:9Line detected, which is longer than the defined maximum line length in the code style.
38 @JvmStatic
39 fun cancelDailyTrackingReminder(context: Context) {
40 val manager = context.getSystemService(Context.ALARM_SERVICE) as AlarmManager
41 manager.cancel(PendingIntent.getBroadcast(context, 0, Intent(context, OrigamiDailyTrackingAlarmReceiver::class.java), PendingIntent.FLAG_IMMUTABLE))
42 }
43
44 @JvmStatic
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/reminders/OrigamiReminderUtil.kt:51:17Line detected, which is longer than the defined maximum line length in the code style.
48 AlarmManager.RTC_WAKEUP,
49 timeInMillis,
50 AlarmManager.INTERVAL_DAY,
51 PendingIntent.getBroadcast(context, 0, Intent(context, OrigamiMedicationAlarmReceiver::class.java), PendingIntent.FLAG_IMMUTABLE))
52 }
53
54 /**
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/reminders/OrigamiReminderUtil.kt:63:17Line detected, which is longer than the defined maximum line length in the code style.
60 context.getSystemService(Context.ALARM_SERVICE) as AlarmManager,
61 AlarmManager.ELAPSED_REALTIME_WAKEUP,
62 timeInMillis,
63 PendingIntent.getBroadcast(context, 0, Intent(context, OrigamiMedicationAlarmReceiver::class.java), PendingIntent.FLAG_IMMUTABLE))
64 }
65
66 @JvmStatic
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/reminders/OrigamiReminderUtil.kt:69:9Line detected, which is longer than the defined maximum line length in the code style.
66 @JvmStatic
67 fun cancelMedicationReminder(context: Context) {
68 val manager = context.getSystemService(Context.ALARM_SERVICE) as AlarmManager
69 manager.cancel(PendingIntent.getBroadcast(context, 0, Intent(context, OrigamiMedicationAlarmReceiver::class.java), PendingIntent.FLAG_IMMUTABLE))
70 }
71
72 @JvmStatic
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/reminders/OrigamiReminderUtil.kt:79:17Line detected, which is longer than the defined maximum line length in the code style.
76 AlarmManager.RTC_WAKEUP,
77 timeInMillis,
78 AlarmManager.INTERVAL_DAY,
79 PendingIntent.getBroadcast(context, 0, Intent(context, OrigamiSleepAlarmReceiver::class.java), PendingIntent.FLAG_IMMUTABLE))
80 }
81
82 /**
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/reminders/OrigamiReminderUtil.kt:91:17Line detected, which is longer than the defined maximum line length in the code style.
88 context.getSystemService(Context.ALARM_SERVICE) as AlarmManager,
89 AlarmManager.ELAPSED_REALTIME_WAKEUP,
90 timeInMillis,
91 PendingIntent.getBroadcast(context, 0, Intent(context, OrigamiSleepAlarmReceiver::class.java), PendingIntent.FLAG_IMMUTABLE))
92 }
93
94 @JvmStatic
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/reminders/OrigamiReminderUtil.kt:97:9Line detected, which is longer than the defined maximum line length in the code style.
94 @JvmStatic
95 fun cancelSleepReminder(context: Context) {
96 val manager = context.getSystemService(Context.ALARM_SERVICE) as AlarmManager
97 manager.cancel(PendingIntent.getBroadcast(context, 0, Intent(context, OrigamiSleepAlarmReceiver::class.java), PendingIntent.FLAG_IMMUTABLE))
98 }
99
100 const val EXTRA_REMINDER_TYPE_ID = "extra_reminder_type_id"
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/reminders/OrigamiReminderUtil.kt:107:13Line detected, which is longer than the defined maximum line length in the code style.
104 MEDICATION(NotificationCoreUtils.ORIGAMI_MEDICATION_REMINDER_ID),
105 SLEEP(NotificationCoreUtils.ORIGAMI_SLEEP_REMINDER_ID);
106 companion object {
107 fun getByNotificationId(id: Int): ReminderType? = ReminderType.values().firstOrNull { it.notificationId == id }
108 }
109 }
110 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/ConfigurationRepository.kt:42:6Line detected, which is longer than the defined maximum line length in the code style.
39 fun refreshConfiguration(date: DateTime, doFinally: (() -> Unit)? = null)
40
41 /**
42 * Updates local versions of Tracker Configurations for the range between dateFrom and dateTo (inclusive) by performing parallel network calls.
43 */
44 fun refreshConfigurations(dateFrom: DateTime, dateTo: DateTime, doFinally: (() -> Unit)? = null)
45
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/ConfigurationRepository.kt:72:35Line detected, which is longer than the defined maximum line length in the code style.
69
70 class ConfigurationRepositoryImpl(private val greenDayService: GreenDayService,
71 private val configurationDao: TrackerConfigurationDao,
72 private val sharedPreferencesRepository: OrigamiSharedPreferencesRepository) : ConfigurationRepository {
73
74 override fun getConfiguration(date: DateTime): LiveData<TrackerConfiguration?> =
75 configurationDao.getConfigurationForDate(date)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/ConfigurationRepository.kt:103:5Line detected, which is longer than the defined maximum line length in the code style.
100 })
101 }
102
103 override fun refreshConfiguration(date: DateTime, doFinally: (() -> Unit)?) = greenDayService.getConfiguration(date.toTrackerDateString())
104 .withDefaultSchedulers()
105 .doFinally {
106 doFinally?.invoke()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/ConfigurationRepository.kt:125:9Line detected, which is longer than the defined maximum line length in the code style.
122 })
123
124 override fun refreshConfigurations(dateFrom: DateTime, dateTo: DateTime, doFinally: (() -> Unit)?) {
125 val list: List<Single<TrackerConfigurationResponse>> = provideValidDateInterval(dateFrom, dateTo).toDateTimes(TimeUnit.DAY).map { date ->
126 greenDayService.getConfiguration(date.toTrackerDateString())
127 }.toList()
128 Single.zip(list) { resultArray -> resultArray.filterNotNull().filterIsInstance<TrackerConfigurationResponse>() }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/ConfigurationRepository.kt:136:25Line detected, which is longer than the defined maximum line length in the code style.
133 .subscribe(object : DisposableSingleObserver<List<TrackerConfigurationResponse>>() {
134 override fun onSuccess(trackerConfigurationRespons: List<TrackerConfigurationResponse>) {
135 configurationDao.saveConfigurations(trackerConfigurationRespons)
136 if (!sharedPreferencesRepository.containsGreenDayProgramStartDay() && trackerConfigurationRespons.isNotEmpty()) {
137 sharedPreferencesRepository
138 .setGreenDayProgramStartDay(trackerConfigurationRespons.first().configuration?.startDate)
139 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/ConfigurationRepository.kt:138:37Line detected, which is longer than the defined maximum line length in the code style.
135 configurationDao.saveConfigurations(trackerConfigurationRespons)
136 if (!sharedPreferencesRepository.containsGreenDayProgramStartDay() && trackerConfigurationRespons.isNotEmpty()) {
137 sharedPreferencesRepository
138 .setGreenDayProgramStartDay(trackerConfigurationRespons.first().configuration?.startDate)
139 }
140 dispose()
141 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/GoogleFitRepository.kt:7:2Line detected, which is longer than the defined maximum line length in the code style.
4 import com.sharecare.realgreen.origami.tool.sources.GoogleFitTool
5
6 /**
7 * A repository-wrapper around GoogleFitTool that can be used in the view models to avoid passing the context via methods
8 */
9 interface GoogleFitRepository {
10 fun isGoogleFitInstalled(): Boolean
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/GreenDayCompactRepository.kt:34:5Line detected, which is longer than the defined maximum line length in the code style.
31 * Updates the local version of a GreenDayCompacts of the range between dateStart and dateFinish by a network call.
32 * duFinally block is used to handle the UI after the work is done.
33 */
34 fun refreshGreenDayCompacts(dateStart: String, dateFinish: String, forceSync: Boolean = false, doFinally: (() -> Unit)? = null)
35 }
36
37 class GreenDayCompactRepositoryImpl(private val greenDayService: GreenDayService,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/GreenDayCompactRepository.kt:45:5Line detected, which is longer than the defined maximum line length in the code style.
42 override fun getGreenDayCompactsInDateRange(dateStart: Long, dateFinish: Long):
43 LiveData<List<GreenDayCompact>?> = greenDayCompactDao.getGreenDayCompactsInDateRange(dateStart, dateFinish)
44
45 override fun refreshGreenDayCompacts(dateStart: String, dateFinish: String, forceSync: Boolean, doFinally: (() -> Unit)?) {
46 greenDayService.getGreenDaysForRange(dateStart, dateFinish, true)
47 .withDefaultSchedulers()
48 .doFinally { doFinally?.invoke() }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/GreenDayRepository.kt:135:5Line detected, which is longer than the defined maximum line length in the code style.
132 greenDayDao.getAllDetailCharts(origamiTrackerType, startDateTime, timeFrameType)
133 .map { it.firstOrNull() }
134
135 override fun getTrendChart(origamiTrackerType: OrigamiTrackerType?): LiveData<TrackerTrendChart?> = greenDayDao.getAllTrendCharts(origamiTrackerType).map { it.firstOrNull() }
136
137 override fun getAllTrendCharts(): LiveData<List<TrackerTrendChart>> = greenDayDao.getAllTrendCharts()
138
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/GreenDayRepository.kt:163:5Line detected, which is longer than the defined maximum line length in the code style.
160 }
161 }
162
163 override fun refreshGreenDay(date: DateTime, forceSync: Boolean, doOnSuccess: (() -> Unit)?, doOnError: (() -> Unit)?,
164 doFinally: (() -> Unit)?) =
165 greenDayService.getGetGreenDayForDate(date.toTrackerDateString(), forceSync)
166 .withDefaultSchedulers()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/LiveSharedPreferencesRepository.kt:131:1Line detected, which is longer than the defined maximum line length in the code style.
128 fun isSelectorShown(): LivePreference<Boolean>
129 }
130
131 class LiveSharedPreferencesRepositoryImpl(private val liveSharedPreferences: LiveSharedPreferences) : LiveSharedPreferencesRepository {
132
133 override fun getGreenDayProgramStartDayAsLiveData(): LivePreference<String> = liveSharedPreferences
134 .getString(KEY_GREEN_DAY_PROGRAM_START_DAY, DateTime.now().toTrackerDateString())
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/MedicationDetailsRepository.kt:146:6Line detected, which is longer than the defined maximum line length in the code style.
143 }
144
145 /**
146 * Fetches medication extra details, images, info sheet data, form and strength info, based on the HPMedicationResult
147 */
148 private fun fetchMedicationExtraDetails(
149 medicationSection: HPMedicationSection,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/ReminderRepository.kt:42:1Line detected, which is longer than the defined maximum line length in the code style.
39 fun setSleepReminderTime(timeInMillis: Long, context: Context)
40 }
41
42 class ReminderRepositoryImpl(private val sharedPreferencesRepository: OrigamiSharedPreferencesRepository) : ReminderRepository {
43
44 override fun switchDailyTrackingReminder(isReminderOn: Boolean, context: Context) {
45 sharedPreferencesRepository.setDailyTrackingReminderOn(isReminderOn)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/ReminderRepository.kt:47:13Line detected, which is longer than the defined maximum line length in the code style.
44 override fun switchDailyTrackingReminder(isReminderOn: Boolean, context: Context) {
45 sharedPreferencesRepository.setDailyTrackingReminderOn(isReminderOn)
46 if (isReminderOn) {
47 OrigamiReminderUtil.startDailyTrackingReminder(context, sharedPreferencesRepository.getDailyTrackingReminderTime())
48 } else {
49 OrigamiReminderUtil.cancelDailyTrackingReminder(context)
50 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/ReminderRepository.kt:63:13Line detected, which is longer than the defined maximum line length in the code style.
60 override fun switchMedicationReminder(isReminderOn: Boolean, context: Context) {
61 sharedPreferencesRepository.setMedicationReminderOn(isReminderOn)
62 if (isReminderOn) {
63 OrigamiReminderUtil.startMedicationReminder(context, sharedPreferencesRepository.getMedicationReminderTime())
64 } else {
65 OrigamiReminderUtil.cancelMedicationReminder(context)
66 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/SubmissionSharedPreferencesRepository.kt:170:6Line detected, which is longer than the defined maximum line length in the code style.
167 fun getActiveTabIdAsLiveData(trackerType: OrigamiTrackerType?): LiveData<TrackerTabId?>
168
169 /**
170 * GDT Stack position is handled here because in some navigation scenarious the view model may be cleared and once we come back to the fragment,
171 * we want to start with the previously selected position.
172 */
173 fun setGdtStackPosition(position: Int?)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/SubmissionSharedPreferencesRepository.kt:191:5Line detected, which is longer than the defined maximum line length in the code style.
188 putInt(KEY_ALCOHOL_DRINKS, value ?: KEY_ALCOHOL_DRINKS_DEFAULT)
189 }
190
191 override fun getAlcoholDrinks(): Int = sharedPreferencesForSubmission.getInt(KEY_ALCOHOL_DRINKS, KEY_ALCOHOL_DRINKS_DEFAULT)
192
193 override fun getAlcoholDrinksAsLiveData(): LivePreference<Int> = liveSharedPreferences
194 .getInt(KEY_ALCOHOL_DRINKS, KEY_ALCOHOL_DRINKS_DEFAULT)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/SubmissionSharedPreferencesRepository.kt:275:17Line detected, which is longer than the defined maximum line length in the code style.
272 null
273 } else {
274 try {
275 (Gson().fromJson(value, object : TypeToken<Map<String, String>>() {}.type) as? Map<String, String>)?.let {
276 Pair(it.keys.first(), it.values.first())
277 }
278 } catch (e: Exception) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/SubmissionSharedPreferencesRepository.kt:287:17Line detected, which is longer than the defined maximum line length in the code style.
284 override fun getDietImageWithLabelAsLiveData(): LiveData<Pair<String, String>?> =
285 liveSharedPreferences.getString(KEY_DIET_IMAGE_WITH_LABEL_URI, "").map { value ->
286 try {
287 (Gson().fromJson(value, object : TypeToken<Map<String, String>>() {}.type) as? Map<String, String>)?.let {
288 Pair(it.keys.first(), it.values.first())
289 }
290 } catch (e: Exception) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/SubmissionSharedPreferencesRepository.kt:299:5Line detected, which is longer than the defined maximum line length in the code style.
296 putInt(KEY_FITNESS_LEVEL, value ?: KEY_FITNESS_LEVEL_DEFAULT)
297 }
298
299 override fun getFitnessLevel(): Int = sharedPreferencesForSubmission.getInt(KEY_FITNESS_LEVEL, KEY_FITNESS_LEVEL_DEFAULT)
300
301 override fun getFitnessLevelAsLiveData(): LivePreference<Int> = liveSharedPreferences
302 .getInt(KEY_FITNESS_LEVEL, KEY_FITNESS_LEVEL_DEFAULT)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/SubmissionSharedPreferencesRepository.kt:331:5Line detected, which is longer than the defined maximum line length in the code style.
328 putLong(KEY_SLEEP_BED_TIME, value ?: KEY_SLEEP_BED_TIME_DEFAULT)
329 }
330
331 override fun getSleepBedTime(): Long = sharedPreferencesForSubmission.getLong(KEY_SLEEP_BED_TIME, KEY_SLEEP_BED_TIME_DEFAULT)
332
333 override fun getSleepBedTimeAsLiveData(): LivePreference<Long> = liveSharedPreferences
334 .getLong(KEY_SLEEP_BED_TIME, KEY_SLEEP_BED_TIME_DEFAULT)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/SubmissionSharedPreferencesRepository.kt:340:5Line detected, which is longer than the defined maximum line length in the code style.
337 putLong(KEY_SLEEP_RISE_TIME, value ?: KEY_SLEEP_RISE_TIME_DEFAULT)
338 }
339
340 override fun getSleepRiseTime(): Long = sharedPreferencesForSubmission.getLong(KEY_SLEEP_RISE_TIME, KEY_SLEEP_RISE_TIME_DEFAULT)
341
342 override fun getSleepRiseTimeAsLiveData(): LivePreference<Long> = liveSharedPreferences
343 .getLong(KEY_SLEEP_RISE_TIME, KEY_SLEEP_RISE_TIME_DEFAULT)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/SubmissionSharedPreferencesRepository.kt:349:5Line detected, which is longer than the defined maximum line length in the code style.
346 putInt(KEY_SLEEP_QUALITY, value ?: KEY_SLEEP_QUALITY_DEFAULT)
347 }
348
349 override fun getSleepQuality(): Int = sharedPreferencesForSubmission.getInt(KEY_SLEEP_QUALITY, KEY_SLEEP_QUALITY_DEFAULT)
350
351 override fun getSleepQualityAsLiveData(): LivePreference<Int> = liveSharedPreferences
352 .getInt(KEY_SLEEP_QUALITY, KEY_SLEEP_QUALITY_DEFAULT)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/SubmissionSharedPreferencesRepository.kt:374:9Line detected, which is longer than the defined maximum line length in the code style.
371 }
372
373 override fun getSleepNoSleepFlagIsSet(): Boolean =
374 sharedPreferencesForSubmission.getBoolean(KEY_SLEEP_NO_SLEEP_FLAG_IS_SET, KEY_SLEEP_NO_SLEEP_FLAG_IS_SET_DEFAULT)
375
376 override fun getSleepNoSleepFlagIsSetAsLiveData(): LivePreference<Boolean> = liveSharedPreferences
377 .getBoolean(KEY_SLEEP_NO_SLEEP_FLAG_IS_SET, KEY_SLEEP_NO_SLEEP_FLAG_IS_SET_DEFAULT)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/SubmissionSharedPreferencesRepository.kt:383:5Line detected, which is longer than the defined maximum line length in the code style.
380 putInt(KEY_SMOKE_CIGARETTES, value ?: KEY_SMOKE_CIGARETTES_DEFAULT)
381 }
382
383 override fun getSmokeCigarettes(): Int = sharedPreferencesForSubmission.getInt(KEY_SMOKE_CIGARETTES, KEY_SMOKE_CIGARETTES_DEFAULT)
384
385 override fun getSmokeCigarettesAsLiveData(): LivePreference<Int> = liveSharedPreferences
386 .getInt(KEY_SMOKE_CIGARETTES, KEY_SMOKE_CIGARETTES_DEFAULT)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/SubmissionSharedPreferencesRepository.kt:442:5Line detected, which is longer than the defined maximum line length in the code style.
439 null
440 }
441
442 override fun getStressVoiceIdAsLiveData(): LivePreference<Long> = liveSharedPreferences.getLong(KEY_VOICE_STRESS_ID, KEY_VOICE_STRESS_ID_DEFAULT)
443
444 override fun hasStressVoiceId(): Boolean = sharedPreferencesForSubmission.contains(KEY_VOICE_STRESS_ID)
445
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/TrackerHistoryRepository.kt:30:5Line detected, which is longer than the defined maximum line length in the code style.
27 /**
28 * Returns a list of tracker items for the specific date
29 */
30 fun getDayTrackerHistoryItems(origamiTrackerType: OrigamiTrackerType?, updatableDays: Int, date: String): LiveData<List<TrackerItem>>
31
32 /**
33 * Returns a list of daily trackers for the history view
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/TrackerHistoryRepository.kt:40:5Line detected, which is longer than the defined maximum line length in the code style.
37 /**
38 * Requests a refresh of a tracker history items for a specified type and interval
39 */
40 fun refreshTrackerHistoryItems(origamiTrackerType: OrigamiTrackerType, dateInterval: Interval, doFinally: (() -> Unit)?)
41 }
42
43 class TrackerHistoryRepositoryImpl(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/TrackerHistoryRepository.kt:50:5Line detected, which is longer than the defined maximum line length in the code style.
47 private val medicationConfigurationDao: MedicationConfigurationDao
48 ) : TrackerHistoryRepository {
49
50 override fun getTrackerHistoryItems(origamiTrackerType: OrigamiTrackerType?, updatableDays: Int): LiveData<List<TrackerItem>> =
51 trackerHistoryDao.getAllTrackerItems(origamiTrackerType, updatableDays)
52
53 override fun getDayTrackerHistoryItems(origamiTrackerType: OrigamiTrackerType?, updatableDays: Int, date: String): LiveData<List<TrackerItem>> =
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/TrackerHistoryRepository.kt:53:5Line detected, which is longer than the defined maximum line length in the code style.
50 override fun getTrackerHistoryItems(origamiTrackerType: OrigamiTrackerType?, updatableDays: Int): LiveData<List<TrackerItem>> =
51 trackerHistoryDao.getAllTrackerItems(origamiTrackerType, updatableDays)
52
53 override fun getDayTrackerHistoryItems(origamiTrackerType: OrigamiTrackerType?, updatableDays: Int, date: String): LiveData<List<TrackerItem>> =
54 trackerHistoryDao.getDayTrackerItems(origamiTrackerType, updatableDays, date)
55
56 override fun getTrackerHistoryDailies(origamiTrackerType: OrigamiTrackerType?): LiveData<List<TrackerDaily>> =
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/TrackerHistoryRepository.kt:59:5Line detected, which is longer than the defined maximum line length in the code style.
56 override fun getTrackerHistoryDailies(origamiTrackerType: OrigamiTrackerType?): LiveData<List<TrackerDaily>> =
57 trackerHistoryDao.getAllTrackerDailies(origamiTrackerType)
58
59 private fun refreshNonMedicationTrackerHistoryItems(origamiTrackerType: OrigamiTrackerType, dateInterval: Interval, doFinally: (() -> Unit)?) =
60 trackerService.getTrackerHistory(
61 origamiTrackerType.name,
62 dateInterval.start.toTrackerDateString(), dateInterval.end.toTrackerDateString(),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/TrackerHistoryRepository.kt:219:5Line detected, which is longer than the defined maximum line length in the code style.
216 }
217 })
218
219 override fun refreshTrackerHistoryItems(origamiTrackerType: OrigamiTrackerType, dateInterval: Interval, doFinally: (() -> Unit)?) =
220 if (origamiTrackerType == OrigamiTrackerType.MEDICATION_GROUP)
221 refreshMedicationTrackerHistoryItems(dateInterval, doFinally)
222 else
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/TrackerMeasurementRepository.kt:42:6Line detected, which is longer than the defined maximum line length in the code style.
39 fun provideMinMaxBoundsForTrackerType(trackerType: OrigamiTrackerType): LiveData<Pair<Int, Int>>
40
41 /**
42 * Returns pairs with min (pair.first) and max (pair.second) bounds for all OrigamiTrackerTypes shaped in a map where OrigamiTrackerType is the key
43 */
44 fun provideMinMaxBoundsForAllTrackerTypes(): LiveData<Map<OrigamiTrackerType, Pair<Int, Int>>>
45
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/TrackerMeasurementRepository.kt:59:40Line detected, which is longer than the defined maximum line length in the code style.
56 }
57
58 class TrackerMeasurementRepositoryImpl(private val trackerService: TrackerService,
59 private val trackerMeasurementDao: TrackerMeasurementDao) : TrackerMeasurementRepository {
60
61 override fun getMeasurementsByTrackerType(origamiTrackerType: OrigamiTrackerType?): LiveData<List<TrackerMeasurement>> =
62 trackerMeasurementDao.getMeasurementsByTrackerType(origamiTrackerType)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/TrackerMeasurementRepository.kt:61:5Line detected, which is longer than the defined maximum line length in the code style.
58 class TrackerMeasurementRepositoryImpl(private val trackerService: TrackerService,
59 private val trackerMeasurementDao: TrackerMeasurementDao) : TrackerMeasurementRepository {
60
61 override fun getMeasurementsByTrackerType(origamiTrackerType: OrigamiTrackerType?): LiveData<List<TrackerMeasurement>> =
62 trackerMeasurementDao.getMeasurementsByTrackerType(origamiTrackerType)
63
64 override fun provideMinMaxBoundsForTrackerType(trackerType: OrigamiTrackerType): LiveData<Pair<Int, Int>> =
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/TrackerMeasurementRepository.kt:72:21Line detected, which is longer than the defined maximum line length in the code style.
69 val hashMap = HashMap<OrigamiTrackerType, Pair<Int, Int>>()
70
71 OrigamiTrackerType.values().forEach { origamiTrackerType ->
72 val filteredMeasurements = measurements.filter { it.measurementType in origamiTrackerType.getMeasurementTypes() }
73
74 val minMaxBounds = provideMinMaxOrInfinityPair(filteredMeasurements).also { adjustMinMaxBounds(origamiTrackerType, it) }
75 hashMap[origamiTrackerType] = minMaxBounds.toPair()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/TrackerMeasurementRepository.kt:74:21Line detected, which is longer than the defined maximum line length in the code style.
71 OrigamiTrackerType.values().forEach { origamiTrackerType ->
72 val filteredMeasurements = measurements.filter { it.measurementType in origamiTrackerType.getMeasurementTypes() }
73
74 val minMaxBounds = provideMinMaxOrInfinityPair(filteredMeasurements).also { adjustMinMaxBounds(origamiTrackerType, it) }
75 hashMap[origamiTrackerType] = minMaxBounds.toPair()
76 }
77 hashMap
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/TrackerMeasurementRepository.kt:88:5Line detected, which is longer than the defined maximum line length in the code style.
85 * Ex: Blood Pressure with systolic and diastolic.
86 * For this we have to find the larger max and the lower min.
87 */
88 private fun provideMinMaxValuesForMeasurements(origamiTrackerType: OrigamiTrackerType): LiveData<MutablePair<Int, Int>> =
89 getMeasurementsByTrackerType(origamiTrackerType).map { measurements ->
90 provideMinMaxOrInfinityPair(measurements)
91 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/TrackerMeasurementRepository.kt:93:5Line detected, which is longer than the defined maximum line length in the code style.
90 provideMinMaxOrInfinityPair(measurements)
91 }
92
93 override fun getMeasurementByTypeSynchronously(measurementType: TrackerMeasurement.MeasurementType): TrackerMeasurement? =
94 trackerMeasurementDao.getMeasurementByTypeSynchronously(measurementType)
95
96 @Throws(com.sharecare.models.RemoteException::class)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/TrackerMeasurementRepository.kt:126:5Line detected, which is longer than the defined maximum line length in the code style.
123 private fun saveMeasurementProfiles(measurementProfiles: List<MeasurementProfile>) =
124 trackerMeasurementDao.saveMeasurementProfiles(measurementProfiles)
125
126 private fun hasMeasurementsForTypes(types: List<String>): Boolean = trackerMeasurementDao.hasMeasurementsForTypesSynchronously(types)
127
128 private fun prepopulateWithDefaults(market: Market) {
129 val measurementRecords = when (market) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/TrackerMeasurementRepository.kt:149:5Line detected, which is longer than the defined maximum line length in the code style.
146 return MutablePair(minimum.toInt(), maximum.toInt())
147 }
148
149 private fun adjustMinMaxBounds(trackerType: OrigamiTrackerType, minMaxBounds: MutablePair<Int, Int>): Pair<Int, Int> {
150 when (trackerType) {
151 OrigamiTrackerType.ALCOHOL -> minMaxBounds.right = 5
152 OrigamiTrackerType.BLOOD_GLUCOSE -> minMaxBounds.right = 200
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/TrackerRepository.kt:47:6Line detected, which is longer than the defined maximum line length in the code style.
44
45 /**
46 * Submits a tracker to the Tracker Micro Service
47 * If legacyDeletionPolicy will be set to anything aside from NOT_APPLICABLE, then there will be an attempt to delete the
48 * tracker(s) from the GreenDay domain first.
49 * Normally it is set as NOT_APPLICABLE but can be set to something else during the transition period:
50 * when some type of trackers are migrated from the GreenDay domain to the Tracker Micro Service. In this case there could be a situation
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/TrackerRepository.kt:50:6Line detected, which is longer than the defined maximum line length in the code style.
47 * If legacyDeletionPolicy will be set to anything aside from NOT_APPLICABLE, then there will be an attempt to delete the
48 * tracker(s) from the GreenDay domain first.
49 * Normally it is set as NOT_APPLICABLE but can be set to something else during the transition period:
50 * when some type of trackers are migrated from the GreenDay domain to the Tracker Micro Service. In this case there could be a situation
51 * when a user edits Green Day Tracker. So we have to delete it from the Green Day Domain and then
52 * submit it to the Tracker Micro Service.
53 */
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/TrackerRepository.kt:114:6Line detected, which is longer than the defined maximum line length in the code style.
111 private val trackerHistoryDao: TrackerHistoryDao) : TrackerRepository {
112 /**
113 * Submits a tracker to the Tracker Micro Service
114 * If legacyDeletionPolicy will be set to anything aside from NOT_APPLICABLE, then there will be an attempt to delete the
115 * tracker(s) from the GreenDay domain first.
116 * Normally it is set as NOT_APPLICABLE but can be set to something else during the transition period:
117 * when some type of trackers are migrated from the GreenDay domain to the Tracker Micro Service. In this case there could be a situation
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/TrackerRepository.kt:117:6Line detected, which is longer than the defined maximum line length in the code style.
114 * If legacyDeletionPolicy will be set to anything aside from NOT_APPLICABLE, then there will be an attempt to delete the
115 * tracker(s) from the GreenDay domain first.
116 * Normally it is set as NOT_APPLICABLE but can be set to something else during the transition period:
117 * when some type of trackers are migrated from the GreenDay domain to the Tracker Micro Service. In this case there could be a situation
118 * when a user edits Green Day Tracker. So we have to delete it from the Green Day Domain and then
119 * submit it to the Tracker Micro Service.
120 */
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/TrackerRepository.kt:132:17Line detected, which is longer than the defined maximum line length in the code style.
129 submitTrackerMs(id = null, dateTime, tracker, doFinally)
130 }
131 DeletionPolicyOfLegacyTrackers.ALL_PER_DATEKEY -> {
132 val idsToDelete = greenDayDao.getGreenDayForDateSynchronously(dateTime.toTrackerDateString())?.getTrackerListOfType(tracker.type)?.mapNotNull { it.id }
133 idsToDelete?.let { idsToDelete ->
134 trackerDao.deleteTrackersByIds(idsToDelete, tracker.type)
135 idsToDelete.forEach { id ->
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/TrackerRepository.kt:289:13Line detected, which is longer than the defined maximum line length in the code style.
286 })
287 }
288 if (trackersToDelete.isNotEmpty()) {
289 trackerService.deleteTrackerByIdAsync(TrackersToDeleteRequest(trackersToDelete.map { TrackerIdToDeleteRequest(it.id, it.extId) }))
290 .withDefaultSchedulers()
291 .subscribe(object : DisposableSingleObserver<ResponseBody>() {
292 override fun onSuccess(t: ResponseBody) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/TrackerRepository.kt:332:37Line detected, which is longer than the defined maximum line length in the code style.
329 trackerDao.deleteTrackerById(trackerRecord.id,
330 trackerRecord.type)
331 if (trackerRecord.apiCallType == ApiCallTypes.DELETE.name) {
332 trackerHistoryDao.deleteTracker(trackerRecord.id, trackerRecord.dateKey, trackerRecord.type)
333 }
334 }
335 dispose()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/TrackerSettingsRepository.kt:49:37Line detected, which is longer than the defined maximum line length in the code style.
46 }
47
48 class TrackerSettingsRepositoryImpl(private val trackerService: TrackerService,
49 private val sharedPreferencesRepository: OrigamiSharedPreferencesRepository) : TrackerSettingsRepository {
50
51 override fun updateSteps(isAutoTracked: Boolean, onSuccess: (() -> Unit)?, onError: (() -> Unit)?) {
52 sharedPreferencesRepository.setStepsAutoTracked(isAutoTracked)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/VoiceRepository.kt:27:1Line detected, which is longer than the defined maximum line length in the code style.
24 fun refreshVoiceMindsetDescription(stressVoiceId: Long, onError: (e: Throwable) -> Unit)
25 }
26
27 class VoiceRepositoryImpl(private val trackerService: TrackerService, private val voiceDao: VoiceDao) : VoiceRepository {
28
29 override fun getVoiceMindsetDescriptionOrNull(stressVoiceId: Long): LiveData<String?> = voiceDao.getVoiceMindsetDescriptionByStressIdOrNull(stressVoiceId)
30
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/VoiceRepository.kt:29:5Line detected, which is longer than the defined maximum line length in the code style.
26
27 class VoiceRepositoryImpl(private val trackerService: TrackerService, private val voiceDao: VoiceDao) : VoiceRepository {
28
29 override fun getVoiceMindsetDescriptionOrNull(stressVoiceId: Long): LiveData<String?> = voiceDao.getVoiceMindsetDescriptionByStressIdOrNull(stressVoiceId)
30
31 override fun refreshVoiceMindsetDescription(stressVoiceId: Long, onError: (e: Throwable) -> Unit) {
32 trackerService.getInformationFromVoiceStressId(stressVoiceId)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/sleep/AggregatedSensorRepository.kt:53:9Line detected, which is longer than the defined maximum line length in the code style.
50 companion object {
51 @JvmStatic
52 @Throws(IllegalAccessException::class)
53 fun provideToExternalModule() = AggregatedSensorRepositoryImpl(Origami.getDatabaseInstance().aggregatedSensorModel(),
54 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.SENSORS) as SensorsService)
55 }
56 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/sleep/MotionSensorDebugRepository.kt:32:5Line detected, which is longer than the defined maximum line length in the code style.
29 class MotionSensorDebugRepositoryImpl(private val motionSensorDebugDao: MotionSensorDebugDao,
30 private val sensorsService: SensorsService) : MotionSensorDebugRepository {
31
32 override fun storeMotionForDebug(motionSensorEntry: MotionSensorEntry) = motionSensorDebugDao.storeMotionForDebug(motionSensorEntry)
33
34 override fun removeAllBeforeDate(dateTime: DateTime) = motionSensorDebugDao.removeAllBeforeDate(dateTime)
35
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/sleep/MotionSensorDebugRepository.kt:56:9Line detected, which is longer than the defined maximum line length in the code style.
53 companion object {
54 @JvmStatic
55 @Throws(IllegalAccessException::class)
56 fun provideToExternalModule() = MotionSensorDebugRepositoryImpl(Origami.getDatabaseInstance().aggregatedActivityRecognitionModel(),
57 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.SENSORS) as SensorsService)
58 }
59 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/steps/AggregatedStepsRepository.kt:28:9Line detected, which is longer than the defined maximum line length in the code style.
25 companion object {
26 @JvmStatic
27 @Throws(IllegalAccessException::class)
28 fun provideToExternalModule() = AggregatedStepsRepositoryImpl(Origami.getDatabaseInstance().aggregatedStepsModel())
29 }
30 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/steps/AndroidSdkStepsBucketRepositoryImpl.kt:41:1Line detected, which is longer than the defined maximum line length in the code style.
38 fun createOrUpdateBucket(stepsDelta: Int, dateTimeOnSensorReceived: DateTime)
39 }
40
41 class AndroidSdkStepsBucketRepositoryImpl(private val androidSdkStepsBucketDao: AndroidSdkStepsBucketDao) : AndroidSdkStepsBucketRepository {
42 override fun provideStepsTrackers(): List<StepsTracker> = androidSdkStepsBucketDao.getUnsyncedBucketsSynchronously().map { bucketRecord ->
43 StepsTracker.createAutomatic(
44 bucketRecord.serverId,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/steps/AndroidSdkStepsBucketRepositoryImpl.kt:42:5Line detected, which is longer than the defined maximum line length in the code style.
39 }
40
41 class AndroidSdkStepsBucketRepositoryImpl(private val androidSdkStepsBucketDao: AndroidSdkStepsBucketDao) : AndroidSdkStepsBucketRepository {
42 override fun provideStepsTrackers(): List<StepsTracker> = androidSdkStepsBucketDao.getUnsyncedBucketsSynchronously().map { bucketRecord ->
43 StepsTracker.createAutomatic(
44 bucketRecord.serverId,
45 ChannelType.SHARECARE,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/steps/AndroidSdkStepsBucketRepositoryImpl.kt:79:17Line detected, which is longer than the defined maximum line length in the code style.
76 // minutes length)
77 // the end date is a start date plus the bucket length
78 val startDateTime = dateTimeOnSensorReceived.withZone(DateTimeZone.getDefault())
79 .withMinuteOfHour(if (dateTimeOnSensorReceived.withZone(DateTimeZone.getDefault()).minuteOfHour < BUCKET_LENGTH_IN_MINUTES) 0 else BUCKET_LENGTH_IN_MINUTES)
80 .withSecondOfMinute(0)
81 .withMillisOfSecond(0)
82
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/steps/AndroidSdkStepsBucketRepositoryImpl.kt:83:9Line detected, which is longer than the defined maximum line length in the code style.
80 .withSecondOfMinute(0)
81 .withMillisOfSecond(0)
82
83 var stepsBucketRecord: AndroidSdkStepsBucketRecord? = androidSdkStepsBucketDao.getBucketForStartDateIfAnySynchronously(startDateTime.millis)
84 if (stepsBucketRecord == null) {
85 stepsBucketRecord = AndroidSdkStepsBucketRecord().apply {
86 this.startDate = startDateTime.millis
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/steps/AndroidSdkStepsBucketRepositoryImpl.kt:105:9Line detected, which is longer than the defined maximum line length in the code style.
102 companion object {
103 @JvmStatic
104 @Throws(IllegalAccessException::class)
105 fun provideToExternalModule() = AndroidSdkStepsBucketRepositoryImpl(Origami.getDatabaseInstance().androidSdkStepsBucketModel())
106 }
107 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/steps/GoogleFitStepsBucketRepositoryImpl.kt:43:1Line detected, which is longer than the defined maximum line length in the code style.
40 fun readAndSaveBuckets(dataReadResponse: DataReadResponse)
41 }
42
43 class GoogleFitStepsBucketRepositoryImpl(private val googleFitStepsBucketDao: GoogleFitStepsBucketDao) : GoogleFitStepsBucketRepository {
44
45 override fun provideStepsTrackers(): List<StepsTracker> = googleFitStepsBucketDao.getUnsyncedBucketsSynchronously().map { bucketRecord ->
46 StepsTracker.createAutomatic(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/steps/GoogleFitStepsBucketRepositoryImpl.kt:45:5Line detected, which is longer than the defined maximum line length in the code style.
42
43 class GoogleFitStepsBucketRepositoryImpl(private val googleFitStepsBucketDao: GoogleFitStepsBucketDao) : GoogleFitStepsBucketRepository {
44
45 override fun provideStepsTrackers(): List<StepsTracker> = googleFitStepsBucketDao.getUnsyncedBucketsSynchronously().map { bucketRecord ->
46 StepsTracker.createAutomatic(
47 bucketRecord.serverId,
48 ChannelType.GOOGLE_FIT,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/steps/GoogleFitStepsBucketRepositoryImpl.kt:122:9Line detected, which is longer than the defined maximum line length in the code style.
119
120 private fun createGoogleFitStepsBucket(dataset: DataSet?): GoogleFitStepsBucket? {
121 var stepsBucket: GoogleFitStepsBucket? = null
122 if (dataset != null && dataset.dataPoints.size > 0 && dataset.dataPoints[0].getValue(Field.FIELD_STEPS).asInt() > 0) {
123 val numberOfSteps = dataset.dataPoints[0].getValue(Field.FIELD_STEPS).asInt()
124 val startTime = dataset.dataPoints[0].getStartTime(TimeUnit.MILLISECONDS)
125 val roundedStartTime = DateUtils.truncate(Date(startTime), Calendar.HOUR).time
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/steps/ManualStepsBucketRepositoryImpl.kt:55:39Line detected, which is longer than the defined maximum line length in the code style.
52 }
53
54 class ManualStepsBucketRepositoryImpl(private val trackerService: TrackerService,
55 private val manualStepsBucketDao: ManualStepsBucketDao): ManualStepsBucketRepository {
56 override fun provideStepsTrackers(): List<StepsTracker> =
57 manualStepsBucketDao.getUnsyncedBucketsSynchronously().map { bucketRecord ->
58 // because manual trackers can be submitted from iOS and Web too, we need to know if there is any manual
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/steps/ManualStepsBucketRepositoryImpl.kt:64:25Line detected, which is longer than the defined maximum line length in the code style.
61 // tracker with a null server id and our own ext id
62 if (bucketRecord.serverId == null) {
63 try {
64 val response = trackerService.getAggregatedEntriesForStepsTracker(DateTime().withMillis(bucketRecord.endDate).toTrackerDateString())
65 val manualEntryFromServer =
66 response.aggs.find { trackerAggregationData ->
67 trackerAggregationData.key.contains(ChannelType.SHARECARE.name) &&
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/steps/ManualStepsBucketRepositoryImpl.kt:84:25Line detected, which is longer than the defined maximum line length in the code style.
81
82 StepsTracker.createManual(
83 bucketRecord.serverId,
84 DateTime().withZone(DateTimeZone.forID(bucketRecord.dateTimeZoneId)).withMillis(bucketRecord.endDate),
85 bucketRecord.value,
86 bucketRecord.bucketId
87 )
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/steps/ManualStepsBucketRepositoryImpl.kt:90:5Line detected, which is longer than the defined maximum line length in the code style.
87 )
88 }
89
90 override fun createOrUpdateBucket(withStepsToStart: Int, isEditMode: Boolean, extId: String, selectedDate: DateTime) {
91 val manualStepsRecord: ManualStepsBucketRecord? = if (isEditMode) {
92 manualStepsBucketDao.getBucketByExternalIdSynchronously(extId)
93 } else {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/repository/steps/ManualStepsBucketRepositoryImpl.kt:170:5Line detected, which is longer than the defined maximum line length in the code style.
167 }
168 }
169
170 override fun anyPendingTrackers(): Boolean = manualStepsBucketDao.getUnsyncedBucketsCountSynchronously().toInt() == 0
171
172 companion object {
173 private val TAG = ManualStepsBucketRepositoryImpl::class.java.simpleName
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/service/sleep/presenter/SensorPresenter.kt:82:13Line detected, which is longer than the defined maximum line length in the code style.
79 (validTime() && (!isTodaySleepItemReceived || !isTodaySleepReportConfirmed)))
80 val isTodaySleepItemReceived: Boolean
81 get() {
82 return if (overwrittenSettings != null && overwrittenSettings?.overwritenIsItemReceived != null) overwrittenSettings!!.overwritenIsItemReceived!! else repository.isTodaySleepItemReceived
83 }
84 val isTodaySleepReportConfirmed: Boolean
85 get() {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/service/sleep/presenter/SensorPresenter.kt:86:13Line detected, which is longer than the defined maximum line length in the code style.
83 }
84 val isTodaySleepReportConfirmed: Boolean
85 get() {
86 return if (overwrittenSettings != null && overwrittenSettings?.overwritenIsReportConfirmed != null) overwrittenSettings!!.overwritenIsReportConfirmed!! else repository.isTodaySleepReportConfirmed
87 }
88
89 private fun initWindowFinalizerTimer() {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/service/sleep/presenter/SensorPresenter.kt:145:37Line detected, which is longer than the defined maximum line length in the code style.
142 val bufferData: ByteArray = ByteArray(bufferSize)
143 val bytesRead: Int = mvpView!!.readRecordData(bufferData, bufferSize)
144 if (bytesRead > 0) {
145 val gain: Double = AudioUtil.calculateGainDb(bufferData, bufferData.size, sampleRate)
146 if (!java.lang.Double.isInfinite(gain)) {
147 addDbReading(gain.toInt())
148 if (mvpView != null) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/service/sleep/presenter/SensorPresenter.kt:195:29Line detected, which is longer than the defined maximum line length in the code style.
192 if (currentWindow!!.foregroundAppsReadings.size == 0) {
193 currentWindow!!.foregroundAppsReadings.add(reading)
194 } else {
195 val lastReading: ForegroundAppsReading = currentWindow!!.foregroundAppsReadings.get(currentWindow!!.foregroundAppsReadings.size - 1)
196 if (lastReading.foregroundApps.size != reading.foregroundApps.size) {
197 currentWindow!!.getForegroundAppsReadings().add(reading)
198 } else {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/service/sleep/presenter/SensorPresenter.kt:277:17Line detected, which is longer than the defined maximum line length in the code style.
274 private fun validTime(): Boolean {
275 val localNow: DateTime = DateTime(DateUtil.getNonCachedTimezone())
276 val end: DateTime = localNow
277 .withHourOfDay(if (overwrittenSettings != null && overwrittenSettings?.overwritenEndTimerHours != null) overwrittenSettings!!.overwritenEndTimerHours!! else Config.END_HOUR)
278 .withMinuteOfHour(if (overwrittenSettings != null && overwrittenSettings?.overwritenEndTimerMinutes != null) overwrittenSettings!!.overwritenEndTimerMinutes!! else Config.END_MINUTE)
279 val start: DateTime = localNow
280 .withHourOfDay(if (overwrittenSettings != null && overwrittenSettings?.overwritenStartTimerHours != null) overwrittenSettings!!.overwritenStartTimerHours!! else Config.START_HOUR)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/service/sleep/presenter/SensorPresenter.kt:278:17Line detected, which is longer than the defined maximum line length in the code style.
275 val localNow: DateTime = DateTime(DateUtil.getNonCachedTimezone())
276 val end: DateTime = localNow
277 .withHourOfDay(if (overwrittenSettings != null && overwrittenSettings?.overwritenEndTimerHours != null) overwrittenSettings!!.overwritenEndTimerHours!! else Config.END_HOUR)
278 .withMinuteOfHour(if (overwrittenSettings != null && overwrittenSettings?.overwritenEndTimerMinutes != null) overwrittenSettings!!.overwritenEndTimerMinutes!! else Config.END_MINUTE)
279 val start: DateTime = localNow
280 .withHourOfDay(if (overwrittenSettings != null && overwrittenSettings?.overwritenStartTimerHours != null) overwrittenSettings!!.overwritenStartTimerHours!! else Config.START_HOUR)
281 .withMinuteOfHour(if (overwrittenSettings != null && overwrittenSettings?.overwritenStartTimerMinutes != null) overwrittenSettings!!.overwritenStartTimerMinutes!! else Config.START_MINUTE)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/service/sleep/presenter/SensorPresenter.kt:280:17Line detected, which is longer than the defined maximum line length in the code style.
277 .withHourOfDay(if (overwrittenSettings != null && overwrittenSettings?.overwritenEndTimerHours != null) overwrittenSettings!!.overwritenEndTimerHours!! else Config.END_HOUR)
278 .withMinuteOfHour(if (overwrittenSettings != null && overwrittenSettings?.overwritenEndTimerMinutes != null) overwrittenSettings!!.overwritenEndTimerMinutes!! else Config.END_MINUTE)
279 val start: DateTime = localNow
280 .withHourOfDay(if (overwrittenSettings != null && overwrittenSettings?.overwritenStartTimerHours != null) overwrittenSettings!!.overwritenStartTimerHours!! else Config.START_HOUR)
281 .withMinuteOfHour(if (overwrittenSettings != null && overwrittenSettings?.overwritenStartTimerMinutes != null) overwrittenSettings!!.overwritenStartTimerMinutes!! else Config.START_MINUTE)
282 return localNow.isBefore(end) || localNow.isAfter(start) || (localNow == end) || (localNow == start)
283 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/service/sleep/presenter/SensorPresenter.kt:281:17Line detected, which is longer than the defined maximum line length in the code style.
278 .withMinuteOfHour(if (overwrittenSettings != null && overwrittenSettings?.overwritenEndTimerMinutes != null) overwrittenSettings!!.overwritenEndTimerMinutes!! else Config.END_MINUTE)
279 val start: DateTime = localNow
280 .withHourOfDay(if (overwrittenSettings != null && overwrittenSettings?.overwritenStartTimerHours != null) overwrittenSettings!!.overwritenStartTimerHours!! else Config.START_HOUR)
281 .withMinuteOfHour(if (overwrittenSettings != null && overwrittenSettings?.overwritenStartTimerMinutes != null) overwrittenSettings!!.overwritenStartTimerMinutes!! else Config.START_MINUTE)
282 return localNow.isBefore(end) || localNow.isAfter(start) || (localNow == end) || (localNow == start)
283 }
284
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/service/sleep/presenter/SensorPresenter.kt:288:13Line detected, which is longer than the defined maximum line length in the code style.
285 private val currentWindowOffset: Long
286 private get() {
287 val offset: Long
288 if ((currentWindow == null) || (currentWindow!!.startDate == null) || (currentWindow!!.startDate.epochTime == 0L)) {
289 offset = WINDOW_DURATION_MILLIS.toLong()
290 } else {
291 offset = System.currentTimeMillis() - currentWindow!!.startDate.epochTime
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/service/sleep/service/MotionCollectingService.kt:32:5Line detected, which is longer than the defined maximum line length in the code style.
29 private lateinit var presenter: MotionPresenter
30 private var activityRecognitionClient: ActivityRecognitionClient? = null
31 private val motionSensorRepository: MotionSensorRepository = MotionSensorRepositoryImpl.provideToExternalModule()
32 private val motionSensorDebugRepository: MotionSensorDebugRepository = MotionSensorDebugRepositoryImpl.provideToExternalModule()
33 private val aggregatedSensorRepository: AggregatedSensorRepository = AggregatedSensorRepositoryImpl.provideToExternalModule()
34 private val pendingIntent: PendingIntent
35 get() {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/service/sleep/service/MotionCollectingService.kt:33:5Line detected, which is longer than the defined maximum line length in the code style.
30 private var activityRecognitionClient: ActivityRecognitionClient? = null
31 private val motionSensorRepository: MotionSensorRepository = MotionSensorRepositoryImpl.provideToExternalModule()
32 private val motionSensorDebugRepository: MotionSensorDebugRepository = MotionSensorDebugRepositoryImpl.provideToExternalModule()
33 private val aggregatedSensorRepository: AggregatedSensorRepository = AggregatedSensorRepositoryImpl.provideToExternalModule()
34 private val pendingIntent: PendingIntent
35 get() {
36 val intent = Intent(this, MotionCollectingService::class.java)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/service/sleep/service/MotionCollectingService.kt:71:21Line detected, which is longer than the defined maximum line length in the code style.
68 val detectedActivities = result.probableActivities
69 val epochNow = DateUtil.getEpochNow()
70 for (detectedActivity in detectedActivities) {
71 // there used to be a time frame for storing motion sensor entries, but now we store them all day long due to the server algorithm
72 // this may cause a crash on some devices when they are low on storage
73 // it happens when users would not open the app for some days and won't trigger the sync process
74 // so the app keeps storing the motion data in the database
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/service/sleep/service/MotionCollectingService.kt:79:25Line detected, which is longer than the defined maximum line length in the code style.
76 // we have to do it in background due to the reason described above
77 motionSensorRepository.removeAllBeforeDate(DateTime().minusDays(MOTION_SENSORS_KEEP_IN_DAYS))
78 if (BuildConfig.DEBUG) {
79 motionSensorDebugRepository.removeAllBeforeDate(DateTime().minusDays(MOTION_SENSORS_KEEP_IN_DAYS))
80 }
81 val motionSensorEntry = MotionSensorEntry(epochNow, detectedActivity.confidence, DetectedActivityTypeUtil
82 .getActivityTypeString(resources, detectedActivity.type))
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/service/sleep/service/MotionCollectingService.kt:81:21Line detected, which is longer than the defined maximum line length in the code style.
78 if (BuildConfig.DEBUG) {
79 motionSensorDebugRepository.removeAllBeforeDate(DateTime().minusDays(MOTION_SENSORS_KEEP_IN_DAYS))
80 }
81 val motionSensorEntry = MotionSensorEntry(epochNow, detectedActivity.confidence, DetectedActivityTypeUtil
82 .getActivityTypeString(resources, detectedActivity.type))
83 motionSensorRepository.storeMotion(motionSensorEntry)
84 if (BuildConfig.DEBUG) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/service/sleep/service/SensorsCollectingService.kt:39:5Line detected, which is longer than the defined maximum line length in the code style.
36 private var wakeLock: PowerManager.WakeLock? = null
37 private var handlerThread: HandlerThread? = null
38 private val SAMPLE_RATE_IN_HZ_GUARANTEED = 44100
39 private val aggregatedSensorRepository: AggregatedSensorRepository = AggregatedSensorRepositoryImpl.provideToExternalModule()
40
41 // --- Service methods ---
42 override fun foregroundServiceType(): ForegroundServiceManager.Type {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/service/sleep/service/SensorsCollectingService.kt:54:9Line detected, which is longer than the defined maximum line length in the code style.
51
52 override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
53 val startCommandValue = super.onStartCommand(intent, flags, startId)
54 if (isSignIn() && presenter != null && presenter!!.isCollectEnabled && getChargingMode() != BatteryChargingState.UNPLUGGED) {
55 updateServiceStatus(true)
56 wakeUpDevice()
57 presenter!!.startMeasuring()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/service/sleep/service/SensorsCollectingService.kt:100:13Line detected, which is longer than the defined maximum line length in the code style.
97 override fun getChargingMode(): BatteryChargingState {
98 val intent = registerReceiver(null, IntentFilter(Intent.ACTION_BATTERY_CHANGED))
99 val extraPlugged = intent!!.getIntExtra(BatteryManager.EXTRA_PLUGGED, -1)
100 if (extraPlugged == BatteryManager.BATTERY_PLUGGED_AC) return BatteryChargingState.CHARGER else if (extraPlugged == BatteryManager.BATTERY_PLUGGED_USB) return BatteryChargingState.USB
101 return BatteryChargingState.UNPLUGGED
102 }
103
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/service/sleep/service/SensorsCollectingService.kt:225:17Line detected, which is longer than the defined maximum line length in the code style.
222 @JvmOverloads
223 fun start(context: Context, isReschedulingNeeded: Boolean = true) {
224 if (isSignIn()) {
225 if (SensorPresenter(SensorDataRepository(AggregatedSensorRepositoryImpl.provideToExternalModule())).isCollectEnabled) {
226 safeServiceStart(context, SensorsCollectingService::class.java)
227 }
228 if (isReschedulingNeeded) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/service/steps/service/AndroidSdkStepsService.kt:51:5Line detected, which is longer than the defined maximum line length in the code style.
48 private var handlerThread: HandlerThread? = null
49 private var epochNow: EpochDate? = null
50 private var dateTimeOnSensorReceived: DateTime? = null
51 private val androidSdkStepsBucketRepository: AndroidSdkStepsBucketRepository = AndroidSdkStepsBucketRepositoryImpl.provideToExternalModule()
52 private val aggregatedStepsRepository: AggregatedStepsRepository = AggregatedStepsRepositoryImpl.provideToExternalModule()
53 private val stepsRepository: StepsRepository = StepsRepositoryImpl.provideToExternalModule()
54 private val origamiSharedPreferencesRepository: OrigamiSharedPreferencesRepository = OrigamiSharedPreferencesRepositoryImpl(Origami.sharedPreferences!!)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/service/steps/service/AndroidSdkStepsService.kt:52:5Line detected, which is longer than the defined maximum line length in the code style.
49 private var epochNow: EpochDate? = null
50 private var dateTimeOnSensorReceived: DateTime? = null
51 private val androidSdkStepsBucketRepository: AndroidSdkStepsBucketRepository = AndroidSdkStepsBucketRepositoryImpl.provideToExternalModule()
52 private val aggregatedStepsRepository: AggregatedStepsRepository = AggregatedStepsRepositoryImpl.provideToExternalModule()
53 private val stepsRepository: StepsRepository = StepsRepositoryImpl.provideToExternalModule()
54 private val origamiSharedPreferencesRepository: OrigamiSharedPreferencesRepository = OrigamiSharedPreferencesRepositoryImpl(Origami.sharedPreferences!!)
55 override fun foregroundServiceType(): ForegroundServiceManager.Type {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/service/steps/service/AndroidSdkStepsService.kt:54:5Line detected, which is longer than the defined maximum line length in the code style.
51 private val androidSdkStepsBucketRepository: AndroidSdkStepsBucketRepository = AndroidSdkStepsBucketRepositoryImpl.provideToExternalModule()
52 private val aggregatedStepsRepository: AggregatedStepsRepository = AggregatedStepsRepositoryImpl.provideToExternalModule()
53 private val stepsRepository: StepsRepository = StepsRepositoryImpl.provideToExternalModule()
54 private val origamiSharedPreferencesRepository: OrigamiSharedPreferencesRepository = OrigamiSharedPreferencesRepositoryImpl(Origami.sharedPreferences!!)
55 override fun foregroundServiceType(): ForegroundServiceManager.Type {
56 return ForegroundServiceManager.Type.PEDOMETER
57 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/service/steps/service/AndroidSdkStepsService.kt:71:21Line detected, which is longer than the defined maximum line length in the code style.
68 sensorManager = getSystemService(SENSOR_SERVICE) as SensorManager
69 if (sensorManager != null) {
70 val stepCounterSensor = sensorManager!!.getDefaultSensor(Sensor.TYPE_STEP_COUNTER)
71 sensorManager!!.registerListener(this, stepCounterSensor, SensorManager.SENSOR_DELAY_NORMAL, handler)
72 }
73 } catch (e: Exception) {
74 LogUtil.logException(e, true, false)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/service/steps/service/AndroidSdkStepsService.kt:95:9Line detected, which is longer than the defined maximum line length in the code style.
92
93 // if the sensor returned an actual steps value and it's been more than 2 mins
94 // (DELAY_OF_REFRESHING_IN_MINUTES) from the last measurement
95 if (event.values.size > 0 && event.sensor.type == Sensor.TYPE_STEP_COUNTER && (dateTimeOnSensorReceived == null || DateTime.now(DateTimeZone.UTC).millis >
96 dateTimeOnSensorReceived!!.plusMinutes(DELAY_OF_REFRESHING_IN_MINUTES).millis)) {
97 // the current datetime and the current amount of steps are fetched
98 dateTimeOnSensorReceived = DateTime.now(DateTimeZone.UTC)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/service/steps/service/AndroidSdkStepsService.kt:117:21Line detected, which is longer than the defined maximum line length in the code style.
114 // if the sensor returned an actual steps value and it's been more than 2 mins
115 // (DELAY_OF_REFRESHING_STEPS) from the last measurement
116 if (event.values.size > 0 && event.sensor.type == Sensor.TYPE_STEP_COUNTER &&
117 (epochNow == null || epochNow!!.epochTime + DELAY_OF_REFRESHING_STEPS <= DateUtil.getEpochNow().epochTime)) {
118 // this is the total number of steps that a user has made since the last phone reboot
119 val cumulativeSteps = event.values[0].toInt()
120 epochNow = DateUtil.getEpochNow()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/service/steps/service/AndroidSdkStepsService.kt:138:25Line detected, which is longer than the defined maximum line length in the code style.
135 // if we have a new day or hour started
136 if (!areSameHour || !isSameDay) {
137 // move the start date of the window one hour earlier or make it the end of the previous day
138 openStepsWindowStatus.openWindow.endDate = if (isSameDay) EpochDate(openStepsWindowStatus.openWindow.startDate.epochTime +
139 DateUtil.HOUR_IN_MILLIS - 1, epochNow!!.zoneId) else DateUtil.getEpochEndOfPreviousDay(Date())
140 // set the number of steps excluding the amount upon the start of the window
141 openStepsWindowStatus.openWindow.numOfSteps = cumulativeSteps - openStepsWindowStatus.stepsAtStartOfWindow
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/service/steps/service/AndroidSdkStepsService.kt:139:33Line detected, which is longer than the defined maximum line length in the code style.
136 if (!areSameHour || !isSameDay) {
137 // move the start date of the window one hour earlier or make it the end of the previous day
138 openStepsWindowStatus.openWindow.endDate = if (isSameDay) EpochDate(openStepsWindowStatus.openWindow.startDate.epochTime +
139 DateUtil.HOUR_IN_MILLIS - 1, epochNow!!.zoneId) else DateUtil.getEpochEndOfPreviousDay(Date())
140 // set the number of steps excluding the amount upon the start of the window
141 openStepsWindowStatus.openWindow.numOfSteps = cumulativeSteps - openStepsWindowStatus.stepsAtStartOfWindow
142 if (BuildConfig.DEBUG) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/service/steps/service/AndroidSdkStepsService.kt:141:25Line detected, which is longer than the defined maximum line length in the code style.
138 openStepsWindowStatus.openWindow.endDate = if (isSameDay) EpochDate(openStepsWindowStatus.openWindow.startDate.epochTime +
139 DateUtil.HOUR_IN_MILLIS - 1, epochNow!!.zoneId) else DateUtil.getEpochEndOfPreviousDay(Date())
140 // set the number of steps excluding the amount upon the start of the window
141 openStepsWindowStatus.openWindow.numOfSteps = cumulativeSteps - openStepsWindowStatus.stepsAtStartOfWindow
142 if (BuildConfig.DEBUG) {
143 openStepsWindowStatus.openWindow.sourceType = Source.SourceType.FT_STEPS.name
144 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/service/steps/service/AndroidSdkStepsService.kt:210:9Line detected, which is longer than the defined maximum line length in the code style.
207 }
208
209 private fun getStepsWindowStatus(cumulativeSteps: Int): StepsWindowModel {
210 val roundedEpochDate = EpochDate(DateUtils.truncate(Date(epochNow!!.getEpochTime()), Calendar.HOUR).time, epochNow!!.zoneId)
211 val stepsWindowStatus = StepsWindowModel()
212 stepsWindowStatus.stepsAtStartOfWindow = cumulativeSteps
213 stepsWindowStatus.openWindow = AggregatedStepsWindow()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/tool/ActiveSleepDevUtil.kt:59:25Line detected, which is longer than the defined maximum line length in the code style.
56 val sharedPreferences = context.getSharedPreferences(PREFS_FILE_NAME, Context.MODE_PRIVATE)
57 return OverwrittenSettings(
58 if (sharedPreferences.getBoolean(Property.TRACK_START_TIME_IS_OVERRIDE.name, false))
59 sharedPreferences.getInt(Property.TRACK_START_TIME_HOURS.name, SensorPresenter.Config.START_HOUR)
60 else null,
61 if (sharedPreferences.getBoolean(Property.TRACK_START_TIME_IS_OVERRIDE.name, false))
62 sharedPreferences.getInt(Property.TRACK_START_TIME_MINUTES.name, SensorPresenter.Config.START_MINUTE)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/tool/ActiveSleepDevUtil.kt:62:25Line detected, which is longer than the defined maximum line length in the code style.
59 sharedPreferences.getInt(Property.TRACK_START_TIME_HOURS.name, SensorPresenter.Config.START_HOUR)
60 else null,
61 if (sharedPreferences.getBoolean(Property.TRACK_START_TIME_IS_OVERRIDE.name, false))
62 sharedPreferences.getInt(Property.TRACK_START_TIME_MINUTES.name, SensorPresenter.Config.START_MINUTE)
63 else null,
64 if (sharedPreferences.getBoolean(Property.TRACK_END_TIME_IS_OVERRIDE.name, false))
65 sharedPreferences.getInt(Property.TRACK_END_TIME_HOURS.name, SensorPresenter.Config.END_HOUR)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/tool/ActiveSleepDevUtil.kt:68:25Line detected, which is longer than the defined maximum line length in the code style.
65 sharedPreferences.getInt(Property.TRACK_END_TIME_HOURS.name, SensorPresenter.Config.END_HOUR)
66 else null,
67 if (sharedPreferences.getBoolean(Property.TRACK_END_TIME_IS_OVERRIDE.name, false))
68 sharedPreferences.getInt(Property.TRACK_END_TIME_MINUTES.name, SensorPresenter.Config.END_MINUTE)
69 else null,
70 if (sharedPreferences.getBoolean(Property.IS_ITEM_RECEIVED_IS_OVERRIDE.name, false))
71 sharedPreferences.getBoolean(Property.IS_ITEM_RECEIVED.name, false)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/tool/DashboardLegacyTrackerDetailsUtil.kt:17:40Line detected, which is longer than the defined maximum line length in the code style.
14 }
15
16 private enum class DetailedTrackerType(val origamiTrackerType: OrigamiTrackerType,
17 val localizedNameRes: Int, val stressIntensity: Int? = null, val value: Double? = null) {
18 LOW_BP(OrigamiTrackerType.BLOOD_PRESSURE, R.string.detailed_tracker_type_name_low_bp, 2),
19 MEDIUM_LOW_BP(OrigamiTrackerType.BLOOD_PRESSURE, R.string.detailed_tracker_type_name_medium_low_bp, 1),
20 MEDIUM_BP(OrigamiTrackerType.BLOOD_PRESSURE, R.string.detailed_tracker_type_name_medium_bp, 2),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/tool/DashboardLegacyTrackerDetailsUtil.kt:108:13Line detected, which is longer than the defined maximum line length in the code style.
105 it.origamiTrackerType == greenDayTracker.type && it.stressIntensity != null &&
106 it.stressIntensity == greenDayTracker.value
107 }
108 if (!greenDayTracker.trackers.isNullOrEmpty() && greenDayTracker.type != null && !greenDayTracker.type!!.canHaveMultipleEntries()) {
109 result = getDetailedTrackerType(greenDayTracker.trackers!!.first(), greenDayTracker.value)
110 } else if (greenDayTracker.type == OrigamiTrackerType.MEDICATION_GROUP && greenDayTracker.value == 1) {
111 result = MEDICATION_GROUP_3
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/tool/DashboardLegacyTrackerDetailsUtil.kt:129:21Line detected, which is longer than the defined maximum line length in the code style.
126 } else if (systolic >= MIN_MEDIUM_HIGH_SYSTOLIC && systolic < MAX_MEDIUM_HIGH_SYSTOLIC ||
127 diastolic >= MIN_MEDIUM_HIGH_DIASTOLIC && diastolic <= MAX_MEDIUM_HIGH_DIASTOLIC) {
128 HIGH_BP
129 } else if (systolic > MIN_MEDIUM_SYSTOLIC && systolic < MAX_MEDIUM_SYSTOLIC || diastolic >= MIN_MEDIUM_DIASTOLIC
130 && diastolic <= MAX_MEDIUM_DIASTOLIC) {
131 MEDIUM_HIGH_BP
132 } else if (systolic >= MIN_MEDIUM_LOW_SYSTOLIC && systolic <= MAX_MEDIUM_LOW_SYSTOLIC && diastolic < MIN_LOW_DIASTOLIC) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/tool/DashboardLegacyTrackerDetailsUtil.kt:132:21Line detected, which is longer than the defined maximum line length in the code style.
129 } else if (systolic > MIN_MEDIUM_SYSTOLIC && systolic < MAX_MEDIUM_SYSTOLIC || diastolic >= MIN_MEDIUM_DIASTOLIC
130 && diastolic <= MAX_MEDIUM_DIASTOLIC) {
131 MEDIUM_HIGH_BP
132 } else if (systolic >= MIN_MEDIUM_LOW_SYSTOLIC && systolic <= MAX_MEDIUM_LOW_SYSTOLIC && diastolic < MIN_LOW_DIASTOLIC) {
133 MEDIUM_LOW_BP
134 } else {
135 LOW_BP
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/tool/DashboardLegacyTrackerDetailsUtil.kt:140:25Line detected, which is longer than the defined maximum line length in the code style.
137 }
138 OrigamiTrackerType.DIET -> {
139 values().firstOrNull {
140 it.origamiTrackerType == origamiTrackerType && it.stressIntensity == (trackerData as? DietTrackerData)?.mealQuantity
141 }
142 }
143 OrigamiTrackerType.SLEEP -> {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/tool/DashboardLegacyTrackerDetailsUtil.kt:146:33Line detected, which is longer than the defined maximum line length in the code style.
143 OrigamiTrackerType.SLEEP -> {
144 values().firstOrNull {
145 it.origamiTrackerType == origamiTrackerType
146 && it.stressIntensity == TrackerSleepUtil.getStressIntensity(TrackerSleepUtil.getSleepValue(trackerData.value).toInt())
147 }
148 }
149 OrigamiTrackerType.STEPS,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/tool/OrigamiSettingsLinkParser.kt:41:1Line detected, which is longer than the defined maximum line length in the code style.
38 }
39 }
40
41 class OrigamiSettingsSourceDestination(val token: String?, private val sourceType: Source.SourceType) : DeepLinkDestination {
42 override fun start(context: Context, asPush: Boolean) {
43 val bundle = Bundle().apply {
44 putString(SettingsFragment.EXTRA_SOURCE_TOKEN, token)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/tool/TrackerDateUtil.kt:213:9Line detected, which is longer than the defined maximum line length in the code style.
210 */
211 fun getHistorySubtitleTextForDay(resources: Resources, dateTime: DateTime): String {
212 val today = DateTime.now().withTimeAtStartOfDay()
213 return if (dateTime.isBefore(today.minusDays(7))) { // if the date is more than a week ago – we use a date, otherwise - the text of a week day
214 if (dateTime.year == today.year) {
215 DATE_FORMAT_SHORT_MONTH.print(dateTime)
216 } else {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/tool/TrackerSleepUtil.kt:51:17Line detected, which is longer than the defined maximum line length in the code style.
48 val hour = sleepValue.toInt()
49 val minutes = MathUtil.toInt(sleepValue % 1 * DateUtil.MINUTE_IN_SECONDS)
50 return String.format(
51 context.getString(R.string.sleep_duration_hours_and_minutes).replace("{placeholder}", "%s"), hour, minutes)
52 }
53
54 @JvmStatic
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/tool/TrackerSupportLinkUtil.kt:14:9Line detected, which is longer than the defined maximum line length in the code style.
11 object TrackerSupportLinkUtil {
12
13 fun injectDevicesAndApplicationsSupportCustomerSupportPath(context: Context, textView: TextView) {
14 val url = NetworkConfigurationUtils().getDevicesAndApplicationsSupportCustomerSupportPath(ConfigurationManager().getConfiguration().getNetworkConfiguration())
15 setupTrackerSupportLink(context, url, context.getString(R.string.tracker_monitor_daily_habits_description), textView)
16 }
17
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/tool/TrackerSupportLinkUtil.kt:15:9Line detected, which is longer than the defined maximum line length in the code style.
12
13 fun injectDevicesAndApplicationsSupportCustomerSupportPath(context: Context, textView: TextView) {
14 val url = NetworkConfigurationUtils().getDevicesAndApplicationsSupportCustomerSupportPath(ConfigurationManager().getConfiguration().getNetworkConfiguration())
15 setupTrackerSupportLink(context, url, context.getString(R.string.tracker_monitor_daily_habits_description), textView)
16 }
17
18 fun injectLivingInGreenScaleTrackerCustomerSupportPath(context: Context, textView: TextView) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/tool/TrackerSupportLinkUtil.kt:19:9Line detected, which is longer than the defined maximum line length in the code style.
16 }
17
18 fun injectLivingInGreenScaleTrackerCustomerSupportPath(context: Context, textView: TextView) {
19 val url = NetworkConfigurationUtils().getLivingInGreenScaleTrackerCustomerSupportPath(ConfigurationManager().getConfiguration().getNetworkConfiguration())
20 setupTrackerSupportLink(context, url, context.getString(R.string.tracker_living_in_the_green_scale_description), textView)
21 }
22
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/tool/TrackerSupportLinkUtil.kt:20:9Line detected, which is longer than the defined maximum line length in the code style.
17
18 fun injectLivingInGreenScaleTrackerCustomerSupportPath(context: Context, textView: TextView) {
19 val url = NetworkConfigurationUtils().getLivingInGreenScaleTrackerCustomerSupportPath(ConfigurationManager().getConfiguration().getNetworkConfiguration())
20 setupTrackerSupportLink(context, url, context.getString(R.string.tracker_living_in_the_green_scale_description), textView)
21 }
22
23 private fun setupTrackerSupportLink(context: Context, url: String, text: String, textView: TextView) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/tool/batterysaver/BatterySaverModeNotification.kt:25:25Line detected, which is longer than the defined maximum line length in the code style.
22 .setContentTitle(context.getString(R.string.notification_battery_saver_title))
23 .setContentText(context.getString(R.string.notification_battery_saver_content))
24 .setContentIntent(
25 NotificationCoreUtils.getPendingIntent(context, RootNavigator.makeIntent(RootDestination.TRACK, context), 0)
26 ).build()
27 NotificationCoreUtils.notify(context, notification, NOTIFICATION_ID)
28 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/tool/sources/GoogleFitTool.kt:56:5Line detected, which is longer than the defined maximum line length in the code style.
53 private const val GOOGLE_FIT_PACKAGE_NAME = "com.google.android.apps.fitness"
54
55 const val GOOGLE_FIT_PERMISSIONS_REQUEST_CODE = 10421
56 private val repository: GoogleFitStepsBucketRepository = GoogleFitStepsBucketRepositoryImpl(Origami.getDatabaseInstance().googleFitStepsBucketModel())
57
58 private val fitnessOptions = FitnessOptions.builder()
59 .addDataType(DataType.TYPE_STEP_COUNT_DELTA, FitnessOptions.ACCESS_READ)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/tool/sources/GoogleFitTool.kt:304:9Line detected, which is longer than the defined maximum line length in the code style.
301
302 @JvmStatic
303 fun getForceSyncAsSingle(context: Context): Single<Boolean> {
304 return if (TrackerPreferenceStore.getRepo().isStepsAutoTracked() && isGoogleFitInstalled(context) && isUserSubscribed(context)) {
305 Single.wrap { observer ->
306 // Since the callback (RequestListener) will be executed in the main thread, we need to block the current thread until we get the result
307 // Otherwise, we will allow other sync step to work earlier. It shouldn't happen.
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/tool/sources/GoogleFitTool.kt:306:17Line detected, which is longer than the defined maximum line length in the code style.
303 fun getForceSyncAsSingle(context: Context): Single<Boolean> {
304 return if (TrackerPreferenceStore.getRepo().isStepsAutoTracked() && isGoogleFitInstalled(context) && isUserSubscribed(context)) {
305 Single.wrap { observer ->
306 // Since the callback (RequestListener) will be executed in the main thread, we need to block the current thread until we get the result
307 // Otherwise, we will allow other sync step to work earlier. It shouldn't happen.
308 val latch = CountDownLatch(1)
309 getRecordedStepsHistory(context, object : RequestListener<DataReadResponse> {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/tool/sources/MotionSensorsTool.kt:56:9Line detected, which is longer than the defined maximum line length in the code style.
53 }
54 }
55
56 logcatSensorsInDebug("Removed all records where the confidence is less then 50% (and there is other one with >50%", motionSensorsBlocks)
57
58 val filteredSensorsBlocks = ArrayList<MotionSensorsBlock>()
59 filteredSensorsBlocks.add(motionSensorsBlocks[0])
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/tool/sources/MotionSensorsTool.kt:71:9Line detected, which is longer than the defined maximum line length in the code style.
68 }
69 }
70
71 logcatSensorsInDebug("Unite all the non-sleep/sleep blocks if they are one after another", filteredSensorsBlocks)
72
73 if (filteredSensorsBlocks.size > 1) {
74 L.d("MotionSensorsBlocks are more than one")
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/tool/sources/MotionSensorsTool.kt:93:13Line detected, which is longer than the defined maximum line length in the code style.
90 // remove all the blocks that are shorter then 30% from the maximum length
91 filteredSensorsBlocks.removeAll { it.getLength() < 0.3 * maxBlockLength }
92
93 logcatSensorsInDebug("Removed all records that are shorter then 30% from the maximum length", filteredSensorsBlocks)
94 }
95 if (filteredSensorsBlocks.isEmpty()) {
96 L.d("filteredSensorsBlocks are empty - bye!")
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/tool/sources/MotionSensorsTool.kt:105:17Line detected, which is longer than the defined maximum line length in the code style.
102 for (i in 1 until filteredSensorsBlocks.size) {
103 if (filteredSensorsBlocks[i - 1].isStill() && !filteredSensorsBlocks[i].isStill()
104 && filteredSensorsBlocks[i].isTooShort()) {
105 filteredSensorsBlocks[i - 1].updateWithBlock(filteredSensorsBlocks[i]) //we don't remove the non-still blocks from the collection because we won't need them anymore
106 }
107 }
108
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/tool/sources/MotionSensorsTool.kt:109:9Line detected, which is longer than the defined maximum line length in the code style.
106 }
107 }
108
109 logcatSensorsInDebug("If there is a non-sleep block after a sleep block which is shorter than 10 minutes - mark it as a sleep block and unite it with the previous sleep block", filteredSensorsBlocks)
110
111 // remove all the blocks that don't have a cross with the sleep time
112 // ex: sleep time is [21:00 - 09:00], so sleep blocks [20:30-01:00], [01:00-03:30], [04:00-10:00] are valid, [14:00-16:00] is not
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/tool/sources/MotionSensorsTool.kt:112:9Line detected, which is longer than the defined maximum line length in the code style.
109 logcatSensorsInDebug("If there is a non-sleep block after a sleep block which is shorter than 10 minutes - mark it as a sleep block and unite it with the previous sleep block", filteredSensorsBlocks)
110
111 // remove all the blocks that don't have a cross with the sleep time
112 // ex: sleep time is [21:00 - 09:00], so sleep blocks [20:30-01:00], [01:00-03:30], [04:00-10:00] are valid, [14:00-16:00] is not
113 filteredSensorsBlocks.removeAll { !isTimeValidToTrack(it) }
114
115 logcatSensorsInDebug("Remove all the blocks that don't have a cross with the sleep time", filteredSensorsBlocks)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/tool/sources/SamsungHealthTool.kt:31:9Line detected, which is longer than the defined maximum line length in the code style.
28
29 @JvmStatic
30 fun optIn(code: String, scheme: String, requestListener: RequestListener) {
31 val trackerService = ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService
32 val softReference = SoftReference(requestListener)
33 val task = trackerService.optInSamsungHealth(code, "$scheme$REDIRECT_URL")
34 .withDefaultSchedulers()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/tool/sources/SamsungHealthTool.kt:50:9Line detected, which is longer than the defined maximum line length in the code style.
47
48 @JvmStatic
49 fun optOut(requestListener: RequestListener) {
50 val trackerService = ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService
51 val softReference = SoftReference(requestListener)
52 val task = trackerService.optOutSamsungHealth()
53 .withDefaultSchedulers()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/tool/sources/SamsungHealthTool.kt:75:9Line detected, which is longer than the defined maximum line length in the code style.
72
73 fun getAuthUrl(): String? {
74 val configuration = ConfigurationManager().getConfiguration()
75 val conf = configuration.getFeatureConfiguration(FeatureConfigurationType.SAMSUNG) as? SamsungHealthConfiguration
76 return conf?.getAuthUrl()
77 }
78
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/worker/GoogleFitStepsWorker.kt:101:21Line detected, which is longer than the defined maximum line length in the code style.
98
99 val request: PeriodicWorkRequest =
100 PeriodicWorkRequestBuilder<GoogleFitStepsWorker>(
101 applyFrequencyForType(FrequencyType.COLLECTING_STEPS_FROM_GF, STEPS_WINDOW_START).toLong(), TimeUnit.SECONDS
102 )
103 .setBackoffCriteria(BackoffPolicy.EXPONENTIAL, 30000, TimeUnit.MILLISECONDS)
104 .setConstraints(constraints)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/worker/OrigamiStepsUploader.kt:30:13Line detected, which is longer than the defined maximum line length in the code style.
27 private val androidSdkStepsBucketRecordDataRepository: AndroidSdkStepsBucketRepository =
28 AndroidSdkStepsBucketRepositoryImpl(Origami.getDatabaseInstance().androidSdkStepsBucketModel())
29 private val manualStepsBucketRecordDataRepository: ManualStepsBucketRepository =
30 ManualStepsBucketRepositoryImpl(ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
31 Origami.getDatabaseInstance().manualStepsBucketModel())
32 private val aggregatedStepsRepository: AggregatedStepsRepositoryImpl = AggregatedStepsRepositoryImpl(Origami.getDatabaseInstance().aggregatedStepsModel())
33
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/worker/OrigamiStepsUploader.kt:32:5Line detected, which is longer than the defined maximum line length in the code style.
29 private val manualStepsBucketRecordDataRepository: ManualStepsBucketRepository =
30 ManualStepsBucketRepositoryImpl(ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.TRACKER) as TrackerService,
31 Origami.getDatabaseInstance().manualStepsBucketModel())
32 private val aggregatedStepsRepository: AggregatedStepsRepositoryImpl = AggregatedStepsRepositoryImpl(Origami.getDatabaseInstance().aggregatedStepsModel())
33
34 fun upload() {
35 cleanOldRecords()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/worker/OrigamiStepsUploader.kt:63:33Line detected, which is longer than the defined maximum line length in the code style.
60 .subscribe(object : DisposableSingleObserver<SubmittedTrackersResponse>() {
61 override fun onSuccess(responseSubmitted: SubmittedTrackersResponse) {
62 try {
63 googleFitStepsBucketRecordDataRepository.createOrUpdateBuckets(responseSubmitted.trackers)
64 manualStepsBucketRecordDataRepository.createOrUpdateBuckets(responseSubmitted.trackers)
65 androidSdkStepsBucketRecordDataRepository.createOrUpdateBuckets(responseSubmitted.trackers)
66 } catch (e: IllegalStateException) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/worker/OrigamiStepsUploader.kt:65:33Line detected, which is longer than the defined maximum line length in the code style.
62 try {
63 googleFitStepsBucketRecordDataRepository.createOrUpdateBuckets(responseSubmitted.trackers)
64 manualStepsBucketRecordDataRepository.createOrUpdateBuckets(responseSubmitted.trackers)
65 androidSdkStepsBucketRecordDataRepository.createOrUpdateBuckets(responseSubmitted.trackers)
66 } catch (e: IllegalStateException) {
67 L.e(TAG, e.cause)
68 } catch (e: com.sharecare.models.RemoteException) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/worker/StepsUploadWorker.kt:74:21Line detected, which is longer than the defined maximum line length in the code style.
71 }.build()
72
73 val request: PeriodicWorkRequest = PeriodicWorkRequestBuilder<StepsUploadWorker>(
74 FrequencyUtil.applyFrequencyForType(FrequencyType.COLLECTING_STEPS_FROM_GF, STEPS_WINDOW_START).toLong(), TimeUnit.SECONDS)
75 .setBackoffCriteria(BackoffPolicy.EXPONENTIAL, 30000, TimeUnit.MILLISECONDS)
76 .setConstraints(constraints)
77 .build()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/worker/StepsUploadWorker.kt:87:13Line detected, which is longer than the defined maximum line length in the code style.
84 }
85
86 fun ensureStepsTrackingRunning(context: Context) {
87 if (OrigamiSharedPreferencesRepositoryImpl(Origami.getSharedPreferencesExternal(context)).isStepsAutoTracked()) {
88 // if we detect steps we collect them from both AndroidSdk and Google Fit if we are allowed to.
89 if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q ||
90 PermissionsUtil.arePermissionsGranted(context, PermissionsUtil.PermissionValue.STEPS)) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_origami/src/main/java/com/sharecare/realgreen/origami/worker/TrackerSyncWorker.kt:36:25Line detected, which is longer than the defined maximum line length in the code style.
33 try {
34 with(TrackerRepositoryImpl.provideToExternalModule()) {
35 batchUploadTracker(GreenDayRepositoryImpl(
36 ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService,
37 Origami.getDatabaseInstance().greenDayModel()
38 ))
39 batchUploadTrackerMs()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_realage_program/src/main/java/com/sharecare/realgreen/realage/adapter/RealAgeProgramCategoryAdapter.kt:16:29Line detected, which is longer than the defined maximum line length in the code style.
13
14
15 class SelectCategoryAdapter(items: List<Category>,
16 listener: ItemClickListener<Category>) : FixedListAdapter<Category, SelectCategoryItemHolder>(items) {
17 init {
18 this.listener = listener
19 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_realage_program/src/main/java/com/sharecare/realgreen/realage/adapter/RealAgeProgramCategoryAdapter.kt:23:9Line detected, which is longer than the defined maximum line length in the code style.
20
21 override fun onCreateActualViewHolder(parent: ViewGroup, viewType: Int): SelectCategoryItemHolder {
22 val inflater = LayoutInflater.from(parent.context)
23 val binding = DataBindingUtil.inflate<ItemCategorySelectionOptionsBinding>(inflater, R.layout.item_category_selection_options, parent, false)
24 return SelectCategoryItemHolder(binding)
25 }
26 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_realage_program/src/main/java/com/sharecare/realgreen/realage/model/OptionsMappers.kt:8:1Line detected, which is longer than the defined maximum line length in the code style.
5 import com.sharecare.realgreen.realage.validations.validateIntInsideRange
6
7 // Just to void writing long definition line
8 private typealias InputCaster = (String, FindingDefinition, Map<NumberPositionInRange, String>, genericError: String) -> Any
9
10 private val MAP_TO_STRING: InputCaster = { input, _, _, _ ->
11 input
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_realage_program/src/main/java/com/sharecare/realgreen/realage/presenter/RealAgeProgramCategoryResultPresenter.kt:94:5Line detected, which is longer than the defined maximum line length in the code style.
91 )
92 }
93
94 /*
95 * method calculates goal points and history points from history response and returns Line of pointers to plot them in graph accordingly.
96 */
97 fun generateLines(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_realage_program/src/main/java/com/sharecare/realgreen/realage/presenter/RealAgeProgramCategoryResultPresenter.kt:135:9Line detected, which is longer than the defined maximum line length in the code style.
132 val minXAxis = context.resources?.getInteger(R.integer.min_x_axis)!!.toFloat()
133 val maxXAxis = context.resources?.getInteger(R.integer.max_x_axis)!!.toFloat()
134 val graphPathEffect = context.resources?.getInteger(R.integer.graph_path_effect)!!.toFloat()
135 val goalPoints = listOf(PointValue(minXAxis, (goalValue).toFloat()), PointValue(maxXAxis, (goalValue).toFloat()))
136 val goalLine = Line(goalPoints)
137 goalLine.color = context.resources.getColor(R.color.primary)
138 goalLine.pathEffect = DashPathEffect(floatArrayOf(graphPathEffect, graphPathEffect), 0F)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_realage_program/src/main/java/com/sharecare/realgreen/realage/presenter/RealAgeProgramPresenter.kt:210:25Line detected, which is longer than the defined maximum line length in the code style.
207
208 RealAgeProgramActivity.DeepLinkActions.REDIRECT_AFTER_FIRST_ANSWER -> {
209 val destination = this.modifier
210 ?: throw RuntimeException("$MODIFIER_ERROR_MESSAGE ${RealAgeProgramActivity.DeepLinkActions.REDIRECT_AFTER_FIRST_ANSWER}")
211 mvpView.navigateToByDeepLinking(destination)
212 true
213 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_realage_program/src/main/java/com/sharecare/realgreen/realage/presenter/RealAgeProgramsPresenter.kt:9:1Line detected, which is longer than the defined maximum line length in the code style.
6 import com.sharecare.realgreen.realage.repository.RealAgeProgramRepository
7 import com.sharecare.realgreen.realage.view.RealAgeProgramsMvpView
8
9 class RealAgeProgramsPresenter(private val repository: RealAgeProgramRepository) : BasePresenter<RealAgeProgramsMvpView>() {
10
11 fun getUserEnrolledProgram() {
12 mvpView.showProgress(true)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_realage_program/src/main/java/com/sharecare/realgreen/realage/presenter/questions/DurationSelectQuestionPresenter.kt:24:9Line detected, which is longer than the defined maximum line length in the code style.
21 override fun buildAnswerOptionsView() {
22 val binding = mvpView.buildAnswerOptionViewBinding() as ItemDurationSelectBinding
23
24 val spinnerArrayAdapter = ArrayAdapter<String>(mvpView.binding.root.context, R.layout.subitem_duration_select, presentableOptions)
25 binding.dropdown.adapter = spinnerArrayAdapter
26 binding.dropdown.setSelection(model.selectedOptionIndex)
27 binding.dropdown.onItemSelectedListener = object : AdapterView.OnItemSelectedListener {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_realage_program/src/main/java/com/sharecare/realgreen/realage/repository/RealAgeProgramDataRepository.kt:36:5Line detected, which is longer than the defined maximum line length in the code style.
33
34 override fun getPostRatDataInsight(): Single<PostRatInsight> = realAgeProgramService.getPostRatDataInsight()
35
36 override fun getFirstQuestion(category: String, queryParameters: HashMap<String, Any>?): Single<Page> = realAgeProgramService.getFirstQuestion(category, queryParameters)
37
38 override fun getQuestion(category: String, question: Question?, currentFindings: Map<String, Any>?, queryParameters: HashMap<String, Any>?): Single<Page> = realAgeProgramService.getQuestion(category, question, currentFindings, queryParameters)
39
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_realage_program/src/main/java/com/sharecare/realgreen/realage/repository/RealAgeProgramDataRepository.kt:38:5Line detected, which is longer than the defined maximum line length in the code style.
35
36 override fun getFirstQuestion(category: String, queryParameters: HashMap<String, Any>?): Single<Page> = realAgeProgramService.getFirstQuestion(category, queryParameters)
37
38 override fun getQuestion(category: String, question: Question?, currentFindings: Map<String, Any>?, queryParameters: HashMap<String, Any>?): Single<Page> = realAgeProgramService.getQuestion(category, question, currentFindings, queryParameters)
39
40 override fun getPreviousQuestion(category: String, questionId: String, queryParameters: HashMap<String, Any>?): Single<Page> = realAgeProgramService.getPreviousQuestion(category, questionId, queryParameters)
41
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_realage_program/src/main/java/com/sharecare/realgreen/realage/repository/RealAgeProgramDataRepository.kt:40:5Line detected, which is longer than the defined maximum line length in the code style.
37
38 override fun getQuestion(category: String, question: Question?, currentFindings: Map<String, Any>?, queryParameters: HashMap<String, Any>?): Single<Page> = realAgeProgramService.getQuestion(category, question, currentFindings, queryParameters)
39
40 override fun getPreviousQuestion(category: String, questionId: String, queryParameters: HashMap<String, Any>?): Single<Page> = realAgeProgramService.getPreviousQuestion(category, questionId, queryParameters)
41
42 override fun getQuestionForUpdate(category: String, updateAction: RealAgeProgramUpdateAction, queryParameters: HashMap<String, Any>?): Single<Page> = realAgeProgramService.getQuestionForUpdate(category, updateAction, queryParameters)
43
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_realage_program/src/main/java/com/sharecare/realgreen/realage/repository/RealAgeProgramDataRepository.kt:42:5Line detected, which is longer than the defined maximum line length in the code style.
39
40 override fun getPreviousQuestion(category: String, questionId: String, queryParameters: HashMap<String, Any>?): Single<Page> = realAgeProgramService.getPreviousQuestion(category, questionId, queryParameters)
41
42 override fun getQuestionForUpdate(category: String, updateAction: RealAgeProgramUpdateAction, queryParameters: HashMap<String, Any>?): Single<Page> = realAgeProgramService.getQuestionForUpdate(category, updateAction, queryParameters)
43
44 override fun navigateToQuestion(category: String, elementId: String, queryParameters: HashMap<String, Any>?): Single<Page> = realAgeProgramService.navigateToQuestion(category, elementId, queryParameters)
45
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_realage_program/src/main/java/com/sharecare/realgreen/realage/repository/RealAgeProgramDataRepository.kt:44:5Line detected, which is longer than the defined maximum line length in the code style.
41
42 override fun getQuestionForUpdate(category: String, updateAction: RealAgeProgramUpdateAction, queryParameters: HashMap<String, Any>?): Single<Page> = realAgeProgramService.getQuestionForUpdate(category, updateAction, queryParameters)
43
44 override fun navigateToQuestion(category: String, elementId: String, queryParameters: HashMap<String, Any>?): Single<Page> = realAgeProgramService.navigateToQuestion(category, elementId, queryParameters)
45
46 override fun leaveProgram(category: String): Single<LeaveProgramResponse> = realAgeProgramService.leaveProgram(category)
47
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_realage_program/src/main/java/com/sharecare/realgreen/realage/repository/RealAgeProgramDataRepository.kt:46:5Line detected, which is longer than the defined maximum line length in the code style.
43
44 override fun navigateToQuestion(category: String, elementId: String, queryParameters: HashMap<String, Any>?): Single<Page> = realAgeProgramService.navigateToQuestion(category, elementId, queryParameters)
45
46 override fun leaveProgram(category: String): Single<LeaveProgramResponse> = realAgeProgramService.leaveProgram(category)
47
48 override fun getEnrolledProgram(): Single<EnrolledProgramResponse> = realAgeProgramService.getEnrolledProgram()
49
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_realage_program/src/main/java/com/sharecare/realgreen/realage/repository/RealAgeProgramDataRepository.kt:52:5Line detected, which is longer than the defined maximum line length in the code style.
49
50 override fun getCategory(): Single<CategoryResponse> = realAgeProgramService.getCategory()
51
52 override fun hideHabits(category: String): Single<HideHabitsModuleResponse> = realAgeProgramService.hideHabits(category)
53
54 override fun getHistoryGraphForProgram(program: String): Single<RealAgeTracker> = realAgeProgramService.getHistoryGraph(program)
55
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_realage_program/src/main/java/com/sharecare/realgreen/realage/repository/RealAgeProgramDataRepository.kt:54:5Line detected, which is longer than the defined maximum line length in the code style.
51
52 override fun hideHabits(category: String): Single<HideHabitsModuleResponse> = realAgeProgramService.hideHabits(category)
53
54 override fun getHistoryGraphForProgram(program: String): Single<RealAgeTracker> = realAgeProgramService.getHistoryGraph(program)
55
56 override fun getWeeklyGraphForProgram(url: String): Single<RealAgeTracker> = realAgeProgramService.getWeeklyGraph(url)
57
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_realage_program/src/main/java/com/sharecare/realgreen/realage/repository/RealAgeProgramDataRepository.kt:56:5Line detected, which is longer than the defined maximum line length in the code style.
53
54 override fun getHistoryGraphForProgram(program: String): Single<RealAgeTracker> = realAgeProgramService.getHistoryGraph(program)
55
56 override fun getWeeklyGraphForProgram(url: String): Single<RealAgeTracker> = realAgeProgramService.getWeeklyGraph(url)
57
58 override fun createTrack(request: TrackerRequest): Single<GdtResponse> {
59 val service = ServiceFactory.getInstance().createService(ServiceFactory
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_realage_program/src/main/java/com/sharecare/realgreen/realage/repository/RealAgeProgramDataRepository.kt:65:5Line detected, which is longer than the defined maximum line length in the code style.
62 return service.createTracker(request)
63 }
64
65 override fun isRapEnable() = ConfigurationManager().getConfiguration().isFeatureEnabled(FeatureToggleType.REALAGE_PROGRAM)
66
67 override fun sendQrData(offeringCode: String, data: List<TemperatureData>): Single<List<TemperatureScanResponse>> = realAgeProgramService.sendQrCodeData(offeringCode, data)
68 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_realage_program/src/main/java/com/sharecare/realgreen/realage/repository/RealAgeProgramDataRepository.kt:67:5Line detected, which is longer than the defined maximum line length in the code style.
64
65 override fun isRapEnable() = ConfigurationManager().getConfiguration().isFeatureEnabled(FeatureToggleType.REALAGE_PROGRAM)
66
67 override fun sendQrData(offeringCode: String, data: List<TemperatureData>): Single<List<TemperatureScanResponse>> = realAgeProgramService.sendQrCodeData(offeringCode, data)
68 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_realage_program/src/main/java/com/sharecare/realgreen/realage/repository/RealAgeProgramRepository.kt:23:5Line detected, which is longer than the defined maximum line length in the code style.
20 interface RealAgeProgramRepository {
21 fun getRealAgeStatus(category: String): Single<Result>
22 fun getFirstQuestion(category: String, queryParameters: HashMap<String, Any>?): Single<Page>
23 fun getQuestion(category: String, question: Question? = null, currentFindings: Map<String, Any>? = null, queryParameters: HashMap<String, Any>?): Single<Page>
24 fun getPreviousQuestion(category: String, questionId: String, queryParameters: HashMap<String, Any>?): Single<Page>
25 fun getQuestionForUpdate(category: String, updateAction: RealAgeProgramUpdateAction, queryParameters: HashMap<String, Any>?): Single<Page>
26 fun navigateToQuestion(category: String, elementId: String, queryParameters: HashMap<String, Any>?): Single<Page>
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_realage_program/src/main/java/com/sharecare/realgreen/realage/repository/RealAgeProgramRepository.kt:25:5Line detected, which is longer than the defined maximum line length in the code style.
22 fun getFirstQuestion(category: String, queryParameters: HashMap<String, Any>?): Single<Page>
23 fun getQuestion(category: String, question: Question? = null, currentFindings: Map<String, Any>? = null, queryParameters: HashMap<String, Any>?): Single<Page>
24 fun getPreviousQuestion(category: String, questionId: String, queryParameters: HashMap<String, Any>?): Single<Page>
25 fun getQuestionForUpdate(category: String, updateAction: RealAgeProgramUpdateAction, queryParameters: HashMap<String, Any>?): Single<Page>
26 fun navigateToQuestion(category: String, elementId: String, queryParameters: HashMap<String, Any>?): Single<Page>
27 fun leaveProgram(category: String): Single<LeaveProgramResponse>
28 fun hideHabits(category: String): Single<HideHabitsModuleResponse>
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_realage_program/src/main/java/com/sharecare/realgreen/realage/service/RealAgeProgramService.kt:43:13Line detected, which is longer than the defined maximum line length in the code style.
40 private fun createNavigateMap(direction: String) = mapOf(KEY_NAVIGATE to direction)
41
42 private val bearerProxy = createServiceWithBearerToken(
43 params.appConfiguration.getNetworkConfiguration().getHostForFeature(NetworkConfigurationType.REALAGE_PROGRAM),
44 RealAgeProgramProxy::class.java
45 )
46
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_realage_program/src/main/java/com/sharecare/realgreen/realage/service/RealAgeProgramService.kt:48:13Line detected, which is longer than the defined maximum line length in the code style.
45 )
46
47 private val SSLProxy = createService(
48 params.appConfiguration.getNetworkConfiguration().getHostForFeature(NetworkConfigurationType.REALAGE_PROGRAM),
49 null,
50 RealAgeProgramProxy::class.java
51 )
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_realage_program/src/main/java/com/sharecare/realgreen/realage/service/RealAgeProgramService.kt:66:5Line detected, which is longer than the defined maximum line length in the code style.
63 }
64
65
66 fun getQuestion(category: String, question: Question? = null, currentFindings: Map<String, Any>?, queryParameters: HashMap<String, Any>?): Single<Page> = let {
67 val request = getQuestionRequest(question, currentFindings, queryParameters)
68 bearerProxy.getQuestion(category, request)
69 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_realage_program/src/main/java/com/sharecare/realgreen/realage/service/RealAgeProgramService.kt:71:5Line detected, which is longer than the defined maximum line length in the code style.
68 bearerProxy.getQuestion(category, request)
69 }
70
71 private fun getQuestionRequest(question: Question?, currentFindings: Map<String, Any>?, queryParameters: HashMap<String, Any>?) = QuestionRequest(
72 accountId = ticketProvider?.ticket?.accountId!!,
73 elementId = question?.id,
74 parameters = queryParameters?.toMutableMap(),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_realage_program/src/main/java/com/sharecare/realgreen/realage/service/RealAgeProgramService.kt:90:5Line detected, which is longer than the defined maximum line length in the code style.
87 )
88
89
90 fun getPreviousQuestion(category: String, questionId: String, queryParameters: HashMap<String, Any>?): Single<Page> = let {
91 val request = getPreviousQuestionRequest(questionId, queryParameters)
92 bearerProxy.getQuestion(category, request)
93 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_realage_program/src/main/java/com/sharecare/realgreen/realage/service/RealAgeProgramService.kt:95:5Line detected, which is longer than the defined maximum line length in the code style.
92 bearerProxy.getQuestion(category, request)
93 }
94
95 private fun getPreviousQuestionRequest(questionId: String, queryParameters: HashMap<String, Any>?) = QuestionRequest(
96 accountId = ticketProvider?.ticket?.accountId!!,
97 elementId = questionId,
98 parameters = addParametersInfo(queryParameters, VALUE_BACK)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_realage_program/src/main/java/com/sharecare/realgreen/realage/service/RealAgeProgramService.kt:101:5Line detected, which is longer than the defined maximum line length in the code style.
98 parameters = addParametersInfo(queryParameters, VALUE_BACK)
99 )
100
101 fun getQuestionForUpdate(category: String, updateAction: RealAgeProgramUpdateAction, queryParameters: HashMap<String, Any>?): Single<Page> = let {
102 val request = getUpdateQuestionRequest(category, updateAction, queryParameters)
103 bearerProxy.getQuestion(category, request)
104 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_realage_program/src/main/java/com/sharecare/realgreen/realage/service/RealAgeProgramService.kt:106:5Line detected, which is longer than the defined maximum line length in the code style.
103 bearerProxy.getQuestion(category, request)
104 }
105
106 fun navigateToQuestion(category: String, elementId: String, queryParameters: HashMap<String, Any>?): Single<Page> = let {
107 val request = buildNavigateToQuestionRequest(elementId, queryParameters)
108 bearerProxy.getQuestion(category, request)
109 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_realage_program/src/main/java/com/sharecare/realgreen/realage/service/RealAgeProgramService.kt:111:5Line detected, which is longer than the defined maximum line length in the code style.
108 bearerProxy.getQuestion(category, request)
109 }
110
111 private fun buildNavigateToQuestionRequest(elementId: String, queryParameters: HashMap<String, Any>?) = QuestionRequest(
112 accountId = ticketProvider?.ticket?.accountId!!,
113 parameters = addParametersInfo(queryParameters, elementId)
114 )
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_realage_program/src/main/java/com/sharecare/realgreen/realage/service/RealAgeProgramService.kt:117:5Line detected, which is longer than the defined maximum line length in the code style.
114 )
115
116
117 private fun getUpdateQuestionRequest(category: String, updateAction: RealAgeProgramUpdateAction, queryParameters: HashMap<String, Any>?): QuestionRequest {
118 val action = when (updateAction) {
119 RealAgeProgramUpdateAction.UPDATE_GOAL -> "${category}Goal"
120 RealAgeProgramUpdateAction.UPDATE_ACTION_STEPS -> "${category}Actions"
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_realage_program/src/main/java/com/sharecare/realgreen/realage/service/RealAgeProgramService.kt:130:5Line detected, which is longer than the defined maximum line length in the code style.
127 )
128 }
129
130 private fun addParametersInfo(queryParameters: HashMap<String, Any>?, value: String, kay: String = KEY_NAVIGATE): MutableMap<String, Any> {
131 var parameters: MutableMap<String, Any> = mutableMapOf()
132 if (queryParameters != null) {
133 parameters = queryParameters.toMutableMap()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_realage_program/src/main/java/com/sharecare/realgreen/realage/util/RealAgeProgramAnalyticsUtil.kt:17:5Line detected, which is longer than the defined maximum line length in the code style.
14 }
15 }
16
17 fun addPageViewEvent(pageName: String, siteSection: String? = null, contentType: String? = null, key: List<String>? = null, value: List<String>? = null) {
18 val pageView = AnalyticsCore.pageView(pageName)
19 if (!siteSection.isNullOrEmpty()) {
20 pageView.siteSectionAndContentType(siteSection, contentType!!)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_realage_program/src/main/java/com/sharecare/realgreen/realage/validations/Validations.kt:8:1Line detected, which is longer than the defined maximum line length in the code style.
5 import java.math.BigInteger
6
7 @Throws(OutsideRangeException::class)
8 fun validateIntInsideRange(value: BigInteger, range: Range?, errorMap: Map<NumberPositionInRange, String>, genericError: String) {
9
10 val numberPosition = whereIsNumberInRange(
11 value,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_realage_program/src/main/java/com/sharecare/realgreen/realage/view/RealAgeProgramActivity.kt:54:9Line detected, which is longer than the defined maximum line length in the code style.
51 private const val PERCENTAGE_SYMBOL = "%"
52 private const val EXTRA_IS_CATEGORY_SELECTED = "category_selected"
53
54 fun start(context: Context, category: String, updateAction: RealAgeProgramUpdateAction? = null, isCategorySelected:Boolean = false) {
55 val intent = Intent(context, RealAgeProgramActivity::class.java)
56 intent.putExtra(EXTRA_CATEGORY, category.capitalize())
57 intent.putExtra(EXTRA_UPDATE_ACTION, updateAction)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_realage_program/src/main/java/com/sharecare/realgreen/realage/view/RealAgeProgramActivity.kt:62:9Line detected, which is longer than the defined maximum line length in the code style.
59 context.startActivity(intent)
60 }
61
62 fun buildDeepLinkDestination(category: String, action: String? = null, modifier: String? = null, queryParameters: Map<String, String?>? = null): DeepLinkDestination {
63 return object : DeepLinkDestination {
64 override fun start(context: Context, asPush: Boolean) {
65 val intent = Intent(context, RealAgeProgramActivity::class.java)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_realage_program/src/main/java/com/sharecare/realgreen/realage/view/RealAgeProgramActivity.kt:188:5Line detected, which is longer than the defined maximum line length in the code style.
185 fragmentManager.executePendingTransactions()
186 }
187
188 /*used findFragmentByTag instead of findFragmentById to get the current fragment as it is created dynamically not declared in xml*/
189 private fun getCurrentFragment(): BaseQuestionFragment {
190 return fragmentManager.findFragmentByTag(questionFragmentTag) as BaseQuestionFragment
191 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_realage_program/src/main/java/com/sharecare/realgreen/realage/view/RealAgeProgramActivity.kt:320:13Line detected, which is longer than the defined maximum line length in the code style.
317 val resultId = result.id.capitalize()
318 val value = listOf(getString(R.string.real_age_program_analytics_assessment, resultId), resultId)
319 RealAgeProgramAnalyticsUtil.addActionEvent(GeneralAnalytics.Action.QUIZCOMPLETE, key, value)
320 RealAgeProgramAnalyticsUtil.addActionEvent(JOIN_PROGRAM, listOf(RealAgeProgramConstants.PROGRAM), listOf(resultId))
321 }
322 openProgramsScreen()
323 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_realage_program/src/main/java/com/sharecare/realgreen/realage/view/RealAgeProgramActivity.kt:346:9Line detected, which is longer than the defined maximum line length in the code style.
343 }
344
345 private fun onQuitClick() {
346 val key = listOf(RealAgeProgramConstants.RG_ASSESSMENT, RealAgeProgramConstants.PROGRAM, RealAgeProgramConstants.PAGE_NAME)
347 val value = listOf(getString(R.string.real_age_program_analytics_assessment, category), category,
348 // For the first time till we get a response, fragment is not added. user can click Quit before its loaded
349 if (getFragmentCount() != 0) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_realage_program/src/main/java/com/sharecare/realgreen/realage/view/RealAgeProgramActivity.kt:348:17Line detected, which is longer than the defined maximum line length in the code style.
345 private fun onQuitClick() {
346 val key = listOf(RealAgeProgramConstants.RG_ASSESSMENT, RealAgeProgramConstants.PROGRAM, RealAgeProgramConstants.PAGE_NAME)
347 val value = listOf(getString(R.string.real_age_program_analytics_assessment, category), category,
348 // For the first time till we get a response, fragment is not added. user can click Quit before its loaded
349 if (getFragmentCount() != 0) {
350 getCurrentFragment().question.title
351 } else {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_realage_program/src/main/java/com/sharecare/realgreen/realage/view/RealAgeProgramCategoryResultFragment.kt:189:9Line detected, which is longer than the defined maximum line length in the code style.
186 }
187
188 private fun leaveProgram() {
189 RealAgeProgramAnalyticsUtil.addActionEvent(LEAVE_PROGRAM, listOf(RealAgeProgramConstants.PROGRAM), listOf(result.id.capitalize()))
190 presenter?.leaveProgram(result.id)
191 }
192
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_realage_program/src/main/java/com/sharecare/realgreen/realage/view/RealAgeProgramsFragment.kt:19:1Line detected, which is longer than the defined maximum line length in the code style.
16 import com.sharecare.realgreen.realage.repository.RealAgeProgramDataRepository
17
18
19 class RealAgeProgramsFragment : BaseFragment<RealAgeProgramsPresenter, RealAgeProgramsMvpView>(), RealAgeProgramsMvpView {
20 lateinit var binding: FragmentProgramsBinding
21
22 override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_realage_program/src/main/java/com/sharecare/realgreen/realage/view/RealAgeProgramsFragment.kt:67:13Line detected, which is longer than the defined maximum line length in the code style.
64 override fun showProgress(status: Boolean) {
65 if (status) {
66 binding.progressBar.visibility = View.VISIBLE
67 getBaseActivity().window.setFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE, WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE)
68 } else {
69 binding.progressBar.visibility = View.GONE
70 getBaseActivity().window.clearFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_realage_program/src/main/java/com/sharecare/realgreen/realage/view/questions/BaseQuestionFragment.kt:61:17Line detected, which is longer than the defined maximum line length in the code style.
58
59 private fun initializeQuestion() {
60 val questionCandidate = arguments?.get(QuestionFragmentExtras.EXTRA_QUESTION)
61 ?: throw RuntimeException("BaseQuestionFragment should have an argument with the key ${QuestionFragmentExtras.EXTRA_QUESTION}")
62
63 question = questionCandidate as Question
64 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_realage_program/src/main/java/com/sharecare/realgreen/realage/view/questions/QuestionFragmentFactory.kt:21:1Line detected, which is longer than the defined maximum line length in the code style.
18 const val EXTRA_QUESTION = "question"
19 }
20
21 fun buildQuestionFragment(question: Question, onQuestionValidStateChanges: OnQuestionValidStateChanges): BaseQuestionFragment {
22 val fragment = buildFragment(question.type)
23
24 fragment.onQuestionValidStateChanges = onQuestionValidStateChanges
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_search/src/main/java/com/sharecare/realgreen/search/repository/SearchDataRepository.kt:51:5Line detected, which is longer than the defined maximum line length in the code style.
48 return allItems.map { it.titleName }
49 }
50
51 override fun searchSuggestionsRemotely(term: String, latitude: Double?, longitude: Double?): Single<List<Suggestions>> {
52 return searchService.suggest(term,
53 makeBasicTypesList(),
54 null, DEFAULT_PAGE, DEFAULT_COUNT, latitude, longitude)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_search/src/main/java/com/sharecare/realgreen/search/repository/SearchDataRepository.kt:68:17Line detected, which is longer than the defined maximum line length in the code style.
65 this.doctors = ((searchMap[PROVIDER]?.results ?: emptyList<Provider>()) as List<Provider>)
66 this.places = (searchMap[PLACES]?.results ?: emptyList<Place>()) as List<Place>
67 this.additionalInfo = searchMap[PROVIDER]?.additionalInfo
68 this.shortcuts = (searchMap[NAVIGATION]?.results ?: emptyList<SearchNavigation>()) as List<SearchNavigation>
69 }
70 }
71 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/domain/analytics/SettingsAnalytics.kt:30:9Line detected, which is longer than the defined maximum line length in the code style.
27 }
28
29 fun onYouSettingsView() {
30 AnalyticsCore.pageView(GeneralAnalytics.Page.ACCOUNT_SETTINGS).siteSectionAndContentType(GeneralAnalytics.Page.YOU_SETTINGS)
31 }
32
33 fun onCommView() {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/domain/analytics/SettingsAnalytics.kt:38:5Line detected, which is longer than the defined maximum line length in the code style.
35 .siteSectionAndContentType(GeneralAnalytics.Page.YOU_SETTINGS)
36 }
37
38 fun onSelectVideoAutoPlayItem(item: String) = FeedVideoAnalytics.reportProfileAutoplayAction(VideoAutoplayType.fromString(item))
39
40
41 fun recordPushAction(categoryTitle: String, optIn: Boolean) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/domain/repositories/AccountRepositoryImpl.kt:28:9Line detected, which is longer than the defined maximum line length in the code style.
25 ) : AccountRepository {
26
27 override suspend fun fetchEmailAsync(): Deferred<String> =
28 withContext(Dispatchers.IO) { async { PreferenceStore.getUserEmailSetting() ?: throw AccountRepositoryException.EmailNotFound() } }
29
30 override suspend fun fetchAccountAsync(): Deferred<Account> = withContext(Dispatchers.IO) { async { ssoService().account } }
31 override suspend fun fetchMarketsAsync(email: String): Deferred<List<MarketItem>> =
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/domain/repositories/AccountRepositoryImpl.kt:30:5Line detected, which is longer than the defined maximum line length in the code style.
27 override suspend fun fetchEmailAsync(): Deferred<String> =
28 withContext(Dispatchers.IO) { async { PreferenceStore.getUserEmailSetting() ?: throw AccountRepositoryException.EmailNotFound() } }
29
30 override suspend fun fetchAccountAsync(): Deferred<Account> = withContext(Dispatchers.IO) { async { ssoService().account } }
31 override suspend fun fetchMarketsAsync(email: String): Deferred<List<MarketItem>> =
32 withContext(Dispatchers.IO) { async { marketService().getUserMarkets(email).blockingGet() } }
33
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/domain/repositories/AccountRepositoryImpl.kt:40:5Line detected, which is longer than the defined maximum line length in the code style.
37 override suspend fun fetchCountriesAsync(): Deferred<List<CountryItem>> =
38 withContext(Dispatchers.IO) { async { configManager.getCountries().blockingGet() } }
39
40 override suspend fun updateAccount(account: Account) = withContext(Dispatchers.IO) { ssoService().patchAccount(account) }
41
42 override fun isPhoneMandatory() = getConfiguration().isFeatureEnabled(FeatureToggleType.ACCOUNT_MANDATORY_PHONE_INPUT)
43
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/domain/repositories/AccountRepositoryImpl.kt:42:5Line detected, which is longer than the defined maximum line length in the code style.
39
40 override suspend fun updateAccount(account: Account) = withContext(Dispatchers.IO) { ssoService().patchAccount(account) }
41
42 override fun isPhoneMandatory() = getConfiguration().isFeatureEnabled(FeatureToggleType.ACCOUNT_MANDATORY_PHONE_INPUT)
43
44 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/domain/repositories/SettingsRepositoryImpl.kt:61:21Line detected, which is longer than the defined maximum line length in the code style.
58 i("Settings Repository: getting language..")
59 return configManager.getConfiguration().getSupportedLocales()
60 .firstOrNull {
61 it.getRegionCode() .equals(LocaleCoreUtil.getSupportedJavaLocale().country, ignoreCase = true) && it.getLanguageCode() == LocaleCoreUtil.getSupportedJavaLocale().language
62
63 } ?: configManager.getConfiguration().getDefaultLocale()
64 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/about/AboutViewModelImpl.kt:7:1Line detected, which is longer than the defined maximum line length in the code style.
4 import com.sharecare.settings.domain.params.SettingsParams
5 import kotlinx.coroutines.flow.MutableStateFlow
6
7 class AboutViewModelImpl(params: SettingsParams) : BaseViewModel<AboutViewModel, SettingsParams>(params), AboutViewModel {
8 override val state: MutableStateFlow<AboutState> = MutableStateFlow(AboutState())
9
10 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/account/types/AccountFeature.kt:7:5Line detected, which is longer than the defined maximum line length in the code style.
4 import com.sharecare.realgreen.core.configuration.feature.FeatureToggleType
5
6 data class AccountFeature(
7 val isDeletable: Boolean = ConfigurationManager().getConfiguration().isFeatureEnabled(FeatureToggleType.DELETE_ACCOUNT),
8 )
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/account/types/AccountField.kt:49:1Line detected, which is longer than the defined maximum line length in the code style.
46 val analyticsKey: String?
47 }
48
49 inline fun <reified T> FieldId.field(noinline setup: (AccountFieldBuilder<T>.() -> Unit)) = AccountFieldBuilder(this, setup).build()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/account/types/AccountFieldModel.kt:59:5Line detected, which is longer than the defined maximum line length in the code style.
56 }
57 }
58
59 fun all(): List<Field<Any>> = AccountFieldModel::class.memberProperties.toList().mapNotNull { it.get(this) as? Field<Any> }
60 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/account/types/AccountStateBuilder.kt:8:1Line detected, which is longer than the defined maximum line length in the code style.
5 import com.sharecare.realgreen.core.architecture.ui.state.ScreenState
6 import com.sharecare.settings.domain.params.AccountParams
7
8 class AccountStateBuilder(setup: (AccountStateBuilder.() -> Unit) = {}) : ScreenState, Logger by AccountParams().androidLogger() {
9
10 val fields: MutableMap<FieldId, Field<Any>> = mutableMapOf()
11
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/account/types/AccountUiState.kt:25:9Line detected, which is longer than the defined maximum line length in the code style.
22 val phoneMandatory: Boolean = false,
23 val countries: List<CountryItem> = listOf(),
24 val markets: List<MarketItem> = listOf(),
25 val version: String = "${appContext().getString(R.string.version)} ${BuildData::class.inject().VERSION_NAME} ${BuildData::class.inject().VERSION_CODE}",
26 override val phase: ScreenPhase = ScreenPhase.Normal,
27 override val navigation: NavigationStateItem? = null,
28 override val events: List<EventStateItem> = listOf(),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/account/types/AccountUiState.kt:30:1Line detected, which is longer than the defined maximum line length in the code style.
27 override val navigation: NavigationStateItem? = null,
28 override val events: List<EventStateItem> = listOf(),
29 val phoneEncodingState: PhoneEncodingStateImpl = PhoneEncodingStateImpl(),
30 ) : StandardScreenState, NavigationState, EventState, PhoneEncodingState by phoneEncodingState, PhoneEncodingStateProvider {
31 override fun phoneEncodingState(): PhoneEncodingStateImpl = phoneEncodingState
32 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/account/viewmodel/AccountViewModel.kt:16:1Line detected, which is longer than the defined maximum line length in the code style.
13 import kotlinx.coroutines.CoroutineScope
14 import kotlinx.coroutines.flow.MutableStateFlow
15
16 interface AccountViewModel : AbstractViewModel, AccountUpdateListener, BackEventHandler, EventsSource, NavigationSource, PhoneEncodingViewModelComposite<PhoneEncodingState> {
17
18 val stateFlow: MutableStateFlow<AccountUiState>
19
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/account/viewmodel/AccountViewModelImpl.kt:89:9Line detected, which is longer than the defined maximum line length in the code style.
86 params: AccountParams? = null,
87 override val stateFlow: MutableStateFlow<AccountUiState> = MutableStateFlow(AccountUiState()),
88 private val helpers: PhoneCollectionHelpers = PhoneCollectionHelpers(),
89 private val composite: PhoneEncodingViewModelCompositeImpl<AccountUiState> = PhoneEncodingViewModelCompositeImpl(
90 accountRepository = accountRepository,
91 phoneRepository = phoneRepository,
92 encodingStateFlow = stateFlow,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/account/viewmodel/AccountViewModelImpl.kt:151:37Line detected, which is longer than the defined maximum line length in the code style.
148 phase = ScreenPhase.Normal,
149 countries = countries,
150 markets = markets,
151 phoneMandatory = accountRepository.getConfiguration().isFeatureEnabled(FeatureToggleType.ACCOUNT_MANDATORY_PHONE_INPUT)
152 )
153 }
154 viewModelScope.launch {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/account/viewmodel/AccountViewModelImpl.kt:163:17Line detected, which is longer than the defined maximum line length in the code style.
160 }
161 } catch (e: Exception) {
162 e("Failed to fetch account data!", e)
163 updateUiState { it.copy(phase = ScreenPhase.Error(e), events = state.events.add(AccountEvent.AccountLoadFailed)) }
164 }
165 } else {
166 i("Skipping account APIs. Account data already fetched")
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/account/viewmodel/AccountViewModelImpl.kt:170:5Line detected, which is longer than the defined maximum line length in the code style.
167 }
168 }
169
170 override suspend fun saveAccountInputs(phoneNumber: String, isMobile: Boolean?): Boolean = withContext(Dispatchers.Main) {
171 i("Save btn pressed. Validating fields and attempting to persist changes..")
172 with(stateFlow.value.fields) {
173 try {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/account/viewmodel/AccountViewModelImpl.kt:243:13Line detected, which is longer than the defined maximum line length in the code style.
240 }
241 } catch (e: PhoneNumberError) {
242 e("Failed to validate number: ${e.message}", e)
243 composite.state = composite.state.copy(phoneEncodingRequestActive = false, phoneEncodingInputError = e.toInputErrorString())
244 state.fields.phonenumber?.validate()
245 } catch (e: Exception) {
246 e("Failed to confirm number: ${e.message}", e)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/account/viewmodel/AccountViewModelImpl.kt:247:13Line detected, which is longer than the defined maximum line length in the code style.
244 state.fields.phonenumber?.validate()
245 } catch (e: Exception) {
246 e("Failed to confirm number: ${e.message}", e)
247 composite.state = composite.state.copy(phoneEncodingRequestActive = false, phoneEncodingApiError = appContext().getString(com.sharecare.realgreen.core.R.string.phonecollect_unspecified_error))
248 state.fields.phonenumber?.validate()
249 }
250 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/account/viewmodel/AccountViewModelImpl.kt:269:9Line detected, which is longer than the defined maximum line length in the code style.
266 }
267
268 override fun onPressDeleteAccount() {
269 state = state.copy(navigation = (configurationManager.getConfiguration().getNetworkConfiguration().getHostForFeature(NetworkConfigurationType.WEBAPP) + "/account/delete").asNavigationItem())
270 }
271
272 override fun onPressTerritory() {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/account/viewmodel/AccountViewModelImpl.kt:310:5Line detected, which is longer than the defined maximum line length in the code style.
307 addClickEvent { onPressTerritory() }
308 }
309
310 private fun AccountStateBuilder.addFieldPhone(account: Account) = addField<String>(AccountFieldModel::phonenumber.cast()) {
311 val phoneMandatory = accountRepository.isPhoneMandatory()
312 label(appContext().getString(R.string.phone_number))
313 hint(appContext().getString(R.string.none_provided))
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/account/viewmodel/AccountViewModelImpl.kt:337:13Line detected, which is longer than the defined maximum line length in the code style.
334 }
335 }
336 displayWhen {
337 account.phoneNumber != null || accountRepository.getConfiguration().isFeatureEnabled(FeatureToggleType.ACCOUNT_PHONE_NUMBER_EDITING)
338 }
339 editableWhen {
340 accountRepository.getConfiguration().isFeatureEnabled(FeatureToggleType.ACCOUNT_PHONE_NUMBER_EDITING)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/account/viewmodel/AccountViewModelImpl.kt:345:5Line detected, which is longer than the defined maximum line length in the code style.
342 analytics(GeneralAnalytics.FormField.PHONE_NUMBER)
343 }
344
345 private fun AccountStateBuilder.addFieldIsMobile(account: Account) = addField<Boolean?>(AccountFieldModel::isMobile.cast()) {
346 label(appContext().getString(R.string.account_this_is_a_mobile_nb))
347 initWith(account.isMobilePhone)
348 editableWhen { false }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/account/viewmodel/AccountViewModelImpl.kt:362:5Line detected, which is longer than the defined maximum line length in the code style.
359 displayWhen { !addressData.isEmpty() }
360 }
361
362 private fun AccountStateBuilder.addFieldZipcode(account: Account) = addField<String>(AccountFieldModel::zipcode.cast()) {
363 label(appContext().getString(R.string.zip_code))
364 initWith(account.zipCode)
365 editableWhen {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/account/viewmodel/AccountViewModelImpl.kt:388:5Line detected, which is longer than the defined maximum line length in the code style.
385 }
386 }
387
388 private fun AccountStateBuilder.addFieldBirthdate(account: Account) = addField<DateTime?>(AccountFieldModel::birthdate.cast()) {
389 val minAge =
390 (accountRepository.getConfiguration()
391 .getFeatureConfiguration(FeatureConfigurationType.REGISTRATION) as RegistrationConfiguration).getMinimumAge()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/account/viewmodel/AccountViewModelImpl.kt:391:25Line detected, which is longer than the defined maximum line length in the code style.
388 private fun AccountStateBuilder.addFieldBirthdate(account: Account) = addField<DateTime?>(AccountFieldModel::birthdate.cast()) {
389 val minAge =
390 (accountRepository.getConfiguration()
391 .getFeatureConfiguration(FeatureConfigurationType.REGISTRATION) as RegistrationConfiguration).getMinimumAge()
392 label(appContext().getString(R.string.birth_date))
393 initWith(DateTime(account.birthDate, DateTimeZone.forTimeZone(TimeZone.getTimeZone("GMT"))))
394 editableWhen { accountRepository.getConfiguration().isFeatureEnabled(FeatureToggleType.ACCOUNT_DOB_EDITING) }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/account/viewmodel/AccountViewModelImpl.kt:396:13Line detected, which is longer than the defined maximum line length in the code style.
393 initWith(DateTime(account.birthDate, DateTimeZone.forTimeZone(TimeZone.getTimeZone("GMT"))))
394 editableWhen { accountRepository.getConfiguration().isFeatureEnabled(FeatureToggleType.ACCOUNT_DOB_EDITING) }
395 inputFormat {
396 if (it != null) DateLocalizer.formatDate(it.toInstant(), DateStyle.MEDIUM, TimeZone.getTimeZone("GMT")) else ""
397 }
398 invalidWhen({ BirthdayMissingIssue() }) { date: DateTime? -> date == null }
399 invalidWhen({ MinimumAgeIssue(minAge) }) { date: DateTime? ->
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/account/viewmodel/AccountViewModelImpl.kt:401:17Line detected, which is longer than the defined maximum line length in the code style.
398 invalidWhen({ BirthdayMissingIssue() }) { date: DateTime? -> date == null }
399 invalidWhen({ MinimumAgeIssue(minAge) }) { date: DateTime? ->
400 if (date != null) {
401 !(RegisterValidationUtil.getBirthDateValidator(minAge).apply(DateLocalizer.formatDate(date, DateStyle.MEDIUM)) as Boolean)
402 } else false
403 }
404 analytics(GeneralAnalytics.FormField.DOB)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/account/viewmodel/AccountViewModelImpl.kt:415:17Line detected, which is longer than the defined maximum line length in the code style.
412 inputFormat { it.resourceStr(appContext()) }
413 parse { Gender.fromString(it) }
414 dropdown { Gender.values().toList() }
415 editableWhen { accountRepository.getConfiguration().isFeatureEnabled(FeatureToggleType.ACCOUNT_GENDER_EDITING) }
416 invalidWhen({ GenderMissingIssue() }) { it == null }
417 analytics(GeneralAnalytics.FormField.GENDER)
418
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/account/viewmodel/AccountViewModelImpl.kt:441:17Line detected, which is longer than the defined maximum line length in the code style.
438 val range = MyPronoun.values().filterNot { it == MyPronoun.NONE }
439 range
440 }
441 displayWhen { accountRepository.getConfiguration().isFeatureEnabled(FeatureToggleType.ACCOUNT_PREFERRED_PRONOUN) }
442 editableWhen { accountRepository.getConfiguration().isFeatureEnabled(FeatureToggleType.ACCOUNT_PREFERRED_PRONOUN) }
443 if (accountRepository.getConfiguration().isFeatureEnabled(FeatureToggleType.ACCOUNT_PREFERRED_PRONOUN_MANDATORY)) {
444 invalidWhen({ PreferredPronounMissingIssue() }) { it == null }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/account/viewmodel/AccountViewModelImpl.kt:442:17Line detected, which is longer than the defined maximum line length in the code style.
439 range
440 }
441 displayWhen { accountRepository.getConfiguration().isFeatureEnabled(FeatureToggleType.ACCOUNT_PREFERRED_PRONOUN) }
442 editableWhen { accountRepository.getConfiguration().isFeatureEnabled(FeatureToggleType.ACCOUNT_PREFERRED_PRONOUN) }
443 if (accountRepository.getConfiguration().isFeatureEnabled(FeatureToggleType.ACCOUNT_PREFERRED_PRONOUN_MANDATORY)) {
444 invalidWhen({ PreferredPronounMissingIssue() }) { it == null }
445 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/account/viewmodel/AccountViewModelImpl.kt:443:17Line detected, which is longer than the defined maximum line length in the code style.
440 }
441 displayWhen { accountRepository.getConfiguration().isFeatureEnabled(FeatureToggleType.ACCOUNT_PREFERRED_PRONOUN) }
442 editableWhen { accountRepository.getConfiguration().isFeatureEnabled(FeatureToggleType.ACCOUNT_PREFERRED_PRONOUN) }
443 if (accountRepository.getConfiguration().isFeatureEnabled(FeatureToggleType.ACCOUNT_PREFERRED_PRONOUN_MANDATORY)) {
444 invalidWhen({ PreferredPronounMissingIssue() }) { it == null }
445 }
446 analytics(GeneralAnalytics.FormField.PREFERRED_PRONOUN)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/account/viewmodel/AccountViewModelImpl.kt:449:5Line detected, which is longer than the defined maximum line length in the code style.
446 analytics(GeneralAnalytics.FormField.PREFERRED_PRONOUN)
447 }
448
449 private fun AccountStateBuilder.addFieldEmail(account: Account) = addField<String>(AccountFieldModel::email.cast()) {
450 label(appContext().getString(R.string.email))
451 initWith(account.email)
452 editableWhen {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/account/viewmodel/AccountViewModelImpl.kt:458:5Line detected, which is longer than the defined maximum line length in the code style.
455 analytics(GeneralAnalytics.FormField.EMAIL)
456 }
457
458 private fun AccountStateBuilder.addFieldLastname(account: Account) = addField<String>(AccountFieldModel::lastname.cast()) {
459 label(appContext().getString(R.string.last_name))
460 initWith(account.lastName)
461 editableWhen {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/account/viewmodel/AccountViewModelImpl.kt:469:5Line detected, which is longer than the defined maximum line length in the code style.
466
467 }
468
469 private fun AccountStateBuilder.addFieldFirstname(account: Account) = addField<String>(AccountFieldModel::firstname.cast()) {
470 label(appContext().getString(R.string.first_name))
471 initWith(account.firstName)
472 editableWhen {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/account/views/AccountDisplayFragment.kt:69:17Line detected, which is longer than the defined maximum line length in the code style.
66 is String -> navigator.toWebPageSimple(destination)
67 SettingsNavigator::restartApp -> navigator.restartApp()
68 SettingsNavigator::navToPasswordActivity -> navigator.navToPasswordActivity()
69 SettingsNavigator::navToTerritoryActivity -> navigator.navToTerritoryActivity(vm.stateFlow.value.markets, CountryUtil().getAlphabeticalCountryList(vm.stateFlow.value.countries))
70 AccountEditFragment::class -> navigator.navigate(AccountDisplayFragmentDirections.toAccountEdit())
71 else -> missingNavigation(destination)
72 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/account/views/AccountDisplayFragment.kt:109:1Line detected, which is longer than the defined maximum line length in the code style.
106 }
107 }
108
109 private fun FragmentAccountDisplayBinding.bindFeatures(api: FragmentApi, vm: AccountViewModel, accountState: AccountUiState) {
110 deleteAccount.visible = accountState.features.isDeletable
111 spacerC.visible = deleteAccount.visible
112 if (accountState.features.isDeletable) deleteAccount.setOnClickListener { vm.onPressDeleteAccount() }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/account/views/AccountDisplayFragment.kt:144:1Line detected, which is longer than the defined maximum line length in the code style.
141 scroll.visible = accountState.phase == ScreenPhase.Normal
142 }
143
144 private fun FragmentAccountDisplayBinding.bindToolbar(api: FragmentApi, vm: AccountViewModel, old: AccountUiState?, new: AccountUiState) =
145 with(toolbar) {
146 title.text = root.context.getString(R.string.account_display_view)
147 iconLeft.setOnClickListener { api.requireParent().onBackPressed() }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/account/views/AccountDisplayFragment.kt:157:13Line detected, which is longer than the defined maximum line length in the code style.
154 }
155 rightTextBtn.visible = new.phase == ScreenPhase.Normal || new.phase is ScreenPhase.Error
156 rightTextBtn.text =
157 if (new.phase == ScreenPhase.Normal) root.context.getString(R.string.btn_edit) else root.context.getString(R.string.btn_retry)
158
159 }
160
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/account/views/AccountEditFragment.kt:74:17Line detected, which is longer than the defined maximum line length in the code style.
71 onNavigationRequest { destination: Any ->
72 when (destination) {
73 SettingsNavigator::restartApp -> navigator.restartApp()
74 CountrySelectionFragment::class -> navigator.navigate(AccountEditFragmentDirections.toCountrySelection())
75 PhoneEncodingSelectionView::class -> navigator.navigate(AccountEditFragmentDirections.toEncodingSelection(true))
76 else -> missingNavigation(destination)
77 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/account/views/AccountEditFragment.kt:75:17Line detected, which is longer than the defined maximum line length in the code style.
72 when (destination) {
73 SettingsNavigator::restartApp -> navigator.restartApp()
74 CountrySelectionFragment::class -> navigator.navigate(AccountEditFragmentDirections.toCountrySelection())
75 PhoneEncodingSelectionView::class -> navigator.navigate(AccountEditFragmentDirections.toEncodingSelection(true))
76 else -> missingNavigation(destination)
77 }
78 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/account/views/AccountEditFragment.kt:127:1Line detected, which is longer than the defined maximum line length in the code style.
124 }
125
126
127 private suspend fun FragmentAccountEditBinding.bindFields(api: FragmentApi, vm: AccountViewModel, old: AccountUiState?, new: AccountUiState) {
128 new.fields.firstname.bindAsTextInput(vm, firstnameContainer, firstname)
129 new.fields.lastname.bindAsTextInput(vm, lastnameContainer, lastname)
130 new.fields.email.bindAsTextInput(vm, emailContainer, email)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/account/views/AccountEditFragment.kt:137:5Line detected, which is longer than the defined maximum line length in the code style.
134 new.fields.zipcode.bindAsTextInput(vm, zipcodeContainer, zipcode)
135 new.fields.preferredPronoun?.bindAsDropDown(vm, preferredPronounContainer, preferredPronoun)
136 new.fields.phonenumber.bindAsTextInput(vm, phoneContainer, phone)
137 phoneContainer.hint = appContext().getString(if (new.phoneMandatory) R.string.phone_number_mandatory else R.string.phone_number)
138 new.fields.isMobile.bindAsEditableCheckbox(vm, mobileCheckbox)
139 new.fields.territory.bindAsButton(vm, territoryContainer, territory)
140 genderHint.visible = new.fields.gender?.edibility?.invoke() ?: false
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/account/views/CountrySearchFragment.kt:69:1Line detected, which is longer than the defined maximum line length in the code style.
66 }
67
68
69 private fun FragmentCountrySearchBinding.bindCountrySearch(params: AccountParams, vm: AccountViewModel) = flowBind(vm.stateFlow) {
70 onEveryUpdate { api: FragmentApi, _: AccountUiState?, new: AccountUiState ->
71 with(new) {
72 try {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/account/views/CountrySearchFragment.kt:74:17Line detected, which is longer than the defined maximum line length in the code style.
71 with(new) {
72 try {
73 bindScreenPhase(new)
74 val initSortedCountries: List<AlphabeticalAdapterItem<*>> = CountryUtil().getAlphabeticalCountryList(countries)
75 bindList(api, vm, this, countries, initSortedCountries)
76 bindToolbar(params, api, vm, new, initSortedCountries)
77 } catch (e: Exception) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/account/views/CountrySearchFragment.kt:138:37Line detected, which is longer than the defined maximum line length in the code style.
135 if (searchTerm.isNotEmpty()) {
136 clearButton.visible = true
137 val filterRedCountries =
138 CountryUtil().getAlphabeticalCountryList(new.countries).filter { it.name.startsWith(searchTerm, true) }
139 countriesView.adapter =
140 makeAdapter(api, vm, filterRedCountries)
141 } else {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/appearance/AppearanceFragment.kt:56:13Line detected, which is longer than the defined maximum line length in the code style.
53 items.removeAllViews()
54 ThemeOption.values().forEach {
55 val itemView = View.inflate(root.context, R.layout.item_radio, null)
56 val layoutParams = RadioGroup.LayoutParams(RadioGroup.LayoutParams.MATCH_PARENT, RadioGroup.LayoutParams.WRAP_CONTENT).apply {
57 leftMargin = root.resources.getDimensionPixelSize(R.dimen.spacing_s)
58 rightMargin = root.resources.getDimensionPixelSize(R.dimen.spacing_s)
59 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/appearance/AppearanceState.kt:7:1Line detected, which is longer than the defined maximum line length in the code style.
4 import com.sharecare.realgreen.core.architecture.ui.state.ScreenPhase
5 import com.sharecare.realgreen.core.architecture.ui.state.StandardScreenState
6
7 data class AppearanceState(val themeSelection: ThemeOption? = null, override val phase: ScreenPhase = ScreenPhase.Normal) :
8 StandardScreenState
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/authorizations/AuthorizationsViewModelImpl.kt:68:13Line detected, which is longer than the defined maximum line length in the code style.
65 override fun loadSponsorUpgrades() = viewModelScope.launch(Dispatchers.IO) {
66 try {
67 val account: Account = repository.getAccount()
68 val eligibility: SponsorMatchResponse = repository.getSponsorsMatches(UserDataUtil.getUserData(account, true))
69 val accountData: UserAccountData = UserDataUtil.getUserData(account, false)
70 state = state.copy(account = account, eligibility = eligibility, userAccountData = accountData)
71 } catch (e: Exception) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/communications/CommunicationsState.kt:7:1Line detected, which is longer than the defined maximum line length in the code style.
4 import com.sharecare.realgreen.core.architecture.ui.state.StandardScreenState
5 import com.sharecare.settings.data.types.SettingsMenuItem
6
7 data class CommunicationsState(val list: List<SettingsMenuItem>, override val phase: ScreenPhase = ScreenPhase.Normal) : StandardScreenState
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/communications/CommunicationsViewModelImpl.kt:22:5Line detected, which is longer than the defined maximum line length in the code style.
19 ) :
20 BaseViewModel<CommunicationsViewModel, SettingsParams>(params), CommunicationsViewModel {
21
22 override val mainState: MutableStateFlow<CommunicationsState> = MutableStateFlow(CommunicationsState(list = buildList()))
23
24 override fun buildList(): List<SettingsMenuItem> {
25 val items = mutableListOf<SettingsMenuItem>()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/communications/CommunicationsViewModelImpl.kt:36:9Line detected, which is longer than the defined maximum line length in the code style.
33
34
35 override fun onItemClick(item: SettingsMenuItem): Unit = when (item) {
36 SettingsMenuItem.PUSH_NOTIFICATIONS -> if (NotificationCoreUtils.isGeneralChannelEnabled(appContext())) navigator.navigate(CommunicationsFragmentDirections.toPushSettings()) else navigator.navigate(CommunicationsFragmentDirections.toPushValidator())
37 SettingsMenuItem.EMAIL_SUBSCRIPTIONS -> WebPageFactory.newEmailSubscriptions().open(navigator.findHost().requireActivity())
38 SettingsMenuItem.SMS_MESSAGING -> navigator.navigate(CommunicationsFragmentDirections.toSmsSettings())
39 else -> throw UnsupportedOperationException("The click implementation for YouSettingItem \"$this\" is missing")
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/communications/CommunicationsViewModelImpl.kt:37:9Line detected, which is longer than the defined maximum line length in the code style.
34
35 override fun onItemClick(item: SettingsMenuItem): Unit = when (item) {
36 SettingsMenuItem.PUSH_NOTIFICATIONS -> if (NotificationCoreUtils.isGeneralChannelEnabled(appContext())) navigator.navigate(CommunicationsFragmentDirections.toPushSettings()) else navigator.navigate(CommunicationsFragmentDirections.toPushValidator())
37 SettingsMenuItem.EMAIL_SUBSCRIPTIONS -> WebPageFactory.newEmailSubscriptions().open(navigator.findHost().requireActivity())
38 SettingsMenuItem.SMS_MESSAGING -> navigator.navigate(CommunicationsFragmentDirections.toSmsSettings())
39 else -> throw UnsupportedOperationException("The click implementation for YouSettingItem \"$this\" is missing")
40 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/info/MoreInfoState.kt:6:1Line detected, which is longer than the defined maximum line length in the code style.
3 import com.sharecare.realgreen.core.architecture.ui.state.ScreenPhase
4 import com.sharecare.realgreen.core.architecture.ui.state.StandardScreenState
5
6 data class MoreInfoState(val description: String? = null, override val phase: ScreenPhase = ScreenPhase.Normal) : StandardScreenState
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/info/MoreInfoViewModelImpl.kt:12:1Line detected, which is longer than the defined maximum line length in the code style.
9 import kotlinx.coroutines.launch
10 import kotlin.reflect.KClass
11
12 class MoreInfoViewModelImpl(params: SettingsParams) : BaseViewModel<MoreInfoViewModel, SettingsParams>(params), MoreInfoViewModel {
13 override val mainState: MutableStateFlow<MoreInfoState> = MutableStateFlow(MoreInfoState())
14
15 override fun initData(description: String) = viewModelScope.launch {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/language/LanguageViewModelImpl.kt:12:1Line detected, which is longer than the defined maximum line length in the code style.
9 import kotlinx.coroutines.flow.MutableStateFlow
10 import kotlinx.coroutines.launch
11
12 class LanguageViewModelImpl(private val navigator: RootNavigator, private val repository: SettingsRepository, params: SettingsParams) :
13 BaseViewModel<LanguageViewModel, SettingsParams>(params),
14 LanguageViewModel {
15 override val mainState: MutableStateFlow<LanguageSettingsState> =
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/language/LanguagesFragment.kt:42:9Line detected, which is longer than the defined maximum line length in the code style.
39 setTitle(R.string.language)
40 }
41
42 val buttonLayoutParams = RadioGroup.LayoutParams(RadioGroup.LayoutParams.MATCH_PARENT, RadioGroup.LayoutParams.WRAP_CONTENT)
43 buttonLayoutParams.leftMargin = api.requireCtx().resources.getDimensionPixelSize(R.dimen.spacing_s)
44 buttonLayoutParams.rightMargin = buttonLayoutParams.leftMargin
45
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/legal/LegalViewModelImpl.kt:31:13Line detected, which is longer than the defined maximum line length in the code style.
28
29 override fun makeList(): List<LegalItem> {
30 val legalFooters =
31 configManager.getConfiguration().getFeatureConfiguration(FeatureConfigurationType.LEGAL_FOOTER) as LegalFootersConfiguration
32 return legalFooters.getLegalFooters(
33 appContext(),
34 true,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/license/LicensesAdapter.kt:22:9Line detected, which is longer than the defined maximum line length in the code style.
19
20 override fun onCreateActualViewHolder(parent: ViewGroup, viewType: Int): LicensesViewHolder {
21 val inflater = LayoutInflater.from(parent.context)
22 val binding = DataBindingUtil.inflate<ItemLegalLicenseBinding>(inflater, R.layout.item_legal_license, parent, false)
23 return LicensesViewHolder(binding)
24 }
25
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/menu/SettingsMenuAdapter.kt:15:1Line detected, which is longer than the defined maximum line length in the code style.
12 import com.sharecare.settings.data.types.SettingsMenuItem
13 import com.sharecare.settings.databinding.ItemSettingsMenuBinding
14
15 class SettingsMenuAdapter(footerView: View?, items: List<SettingsMenuItem>, listener: ItemClickListener<SettingsMenuItem>) :
16 HeaderFooterListAdapter<SettingsMenuItem, SettingsMenuViewHolder>(items) {
17
18 init {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/menu/SettingsMenuAdapter.kt:25:9Line detected, which is longer than the defined maximum line length in the code style.
22
23 override fun onCreateActualViewHolder(parent: ViewGroup, viewType: Int): SettingsMenuViewHolder {
24 val inflater = LayoutInflater.from(parent.context)
25 val binding = DataBindingUtil.inflate<ItemSettingsMenuBinding>(inflater, R.layout.item_settings_menu, parent, false)
26 return SettingsMenuViewHolder(binding)
27 }
28
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/menu/SettingsMenuFragment.kt:56:17Line detected, which is longer than the defined maximum line length in the code style.
53 SettingsMenuItem.APPEARANCE -> navigator.navigate(SettingsMenuFragmentDirections.toAppearanceSettings())
54 SettingsMenuItem.LANGUAGE -> navigator.navigate(SettingsMenuFragmentDirections.toLanguagesSettings())
55 SettingsMenuItem.VIDEO_SETTINGS -> navigator.navigate(SettingsMenuFragmentDirections.toAutoPlay())
56 SettingsMenuItem.AUTHORIZATIONS -> navigator.navigate(SettingsMenuFragmentDirections.toAuthorizationSettings())
57 SettingsMenuItem.SECURITY_PIN -> navigator.navToSecurityPin()
58 SettingsMenuItem.COMMUNICATIONS -> navigator.navigate(SettingsMenuFragmentDirections.toCommunicationSettings())
59 SettingsMenuItem.ABOUT_US -> navigator.navToAboutUs()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/menu/SettingsMenuFragment.kt:58:17Line detected, which is longer than the defined maximum line length in the code style.
55 SettingsMenuItem.VIDEO_SETTINGS -> navigator.navigate(SettingsMenuFragmentDirections.toAutoPlay())
56 SettingsMenuItem.AUTHORIZATIONS -> navigator.navigate(SettingsMenuFragmentDirections.toAuthorizationSettings())
57 SettingsMenuItem.SECURITY_PIN -> navigator.navToSecurityPin()
58 SettingsMenuItem.COMMUNICATIONS -> navigator.navigate(SettingsMenuFragmentDirections.toCommunicationSettings())
59 SettingsMenuItem.ABOUT_US -> navigator.navToAboutUs()
60 SettingsMenuItem.LEGAL -> navigator.navigate(SettingsMenuFragmentDirections.toLegalSettings())
61 SettingsMenuItem.DEVELOPER_OPTIONS -> navigator.navToDeveloperActivity()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/menu/SettingsMenuFragment.kt:88:9Line detected, which is longer than the defined maximum line length in the code style.
85 private fun FragmentSettingsMenuBinding.bindImpl(vm: SettingsMenuViewModel) = flowBind(vm.stateFlow) {
86
87 fun View.makeFooterItem(vm: SettingsMenuViewModel): View =
88 (context.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater).inflate(R.layout.footer_you_settings, null).apply {
89 (findViewById<TextView>(R.id.version)).text = vm.build.makeVersionString()
90 }
91
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/menu/SettingsMenuFragment.kt:101:17Line detected, which is longer than the defined maximum line length in the code style.
98 }
99 items.addItemDecoration(DividerItemDecoration(api.requireCtx()))
100 adapter =
101 SettingsMenuAdapter(this.rootView.makeFooterItem(vm), vm.buildList(), object : ItemClickListener<SettingsMenuItem> {
102 override fun onClick(item: SettingsMenuItem) = vm.onItemClick(item)
103 })
104 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/menu/SettingsMenuViewHolder.kt:13:1Line detected, which is longer than the defined maximum line length in the code style.
10 import com.sharecare.settings.databinding.ItemSettingsMenuBinding
11
12 @Migration(Tag.SettingsModule)
13 class SettingsMenuViewHolder(private val binding: ItemSettingsMenuBinding) : BindableViewHolder<SettingsMenuItem>(binding.root) {
14 override fun onBind(item: SettingsMenuItem) = with(binding) {
15 title.setText(item.title)
16 title.setTextColor(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/menu/SettingsMenuViewModelImpl.kt:70:13Line detected, which is longer than the defined maximum line length in the code style.
67
68 override fun onItemClick(item: SettingsMenuItem) {
69 state = when(item){
70 SettingsMenuItem.SIGN_OUT -> state.copy(events = state.events.toMutableList().apply { add(EventStateItem(item))})
71 else -> state.copy(navigation = item.asNavigationItem())
72 }
73
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/menu/SettingsMenuViewModelImpl.kt:97:9Line detected, which is longer than the defined maximum line length in the code style.
94 )
95 )
96 //VIDEO SETTINGS
97 add(SettingsMenuItem.VIDEO_SETTINGS.setSubTitle(appContext().getString(VideoAutoplayType.typeFromPreference().resourceName)))
98
99 //AUTHORIZATIONS
100 if (ConfigurationManager().getConfiguration().isFeatureEnabled(FeatureToggleType.AUTHORIZATIONS_SETTINGS)) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/sms/SmsSettingsViewModelImpl.kt:42:13Line detected, which is longer than the defined maximum line length in the code style.
39 state = state.copy(settings = result)
40 } catch (e: Exception) {
41 e("Failed to load sms settings: ${e.message}", e)
42 state = state.copy(settings = SubscriptionsSettings(), phase = ScreenPhase.Error(e, container = RetryErrorContainer {
43 loadSmsSettings()
44 }))
45 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/sms/SmsSettingsViewModelImpl.kt:51:17Line detected, which is longer than the defined maximum line length in the code style.
48 override fun onSelectSmsPermission(value: Boolean) = viewModelScope.launch(Dispatchers.IO) {
49 try {
50 val optIn =
51 if (state.settings.notifications.smsOptIn != null) state.settings.notifications.smsOptIn?.copy(value = value) else OptIn(
52 "",
53 value
54 )
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/sponsors/SponsorsFragment.kt:48:9Line detected, which is longer than the defined maximum line length in the code style.
45
46 private fun reportPageView() {
47 val clientName = args.response.sponsorId
48 val pageName = clientName + Constant.SPACE + GeneralAnalytics.Page.ONBOARDING_PORTAL + " | " + args.response.title
49 val siteSection = clientName + Constant.SPACE + GeneralAnalytics.Page.ONBOARDING_PORTAL
50 val contentType = clientName + Constant.SPACE + GeneralAnalytics.Page.ONBOARDING_PORTAL + " | " + args.contentType
51 analytics.pageView(pageName)?.siteSectionAndContentType(siteSection, contentType)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/sponsors/SponsorsFragment.kt:50:9Line detected, which is longer than the defined maximum line length in the code style.
47 val clientName = args.response.sponsorId
48 val pageName = clientName + Constant.SPACE + GeneralAnalytics.Page.ONBOARDING_PORTAL + " | " + args.response.title
49 val siteSection = clientName + Constant.SPACE + GeneralAnalytics.Page.ONBOARDING_PORTAL
50 val contentType = clientName + Constant.SPACE + GeneralAnalytics.Page.ONBOARDING_PORTAL + " | " + args.contentType
51 analytics.pageView(pageName)?.siteSectionAndContentType(siteSection, contentType)
52 }
53
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/sponsors/SponsorsViewModel.kt:29:5Line detected, which is longer than the defined maximum line length in the code style.
26
27 suspend fun register(model: RegistrationModel)
28
29 fun initData(model: RegistrationModel, response: SponsorMatchResponse, userData: UserAccountData, contentType: String)
30
31 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/sponsors/SponsorsViewModelImpl.kt:99:5Line detected, which is longer than the defined maximum line length in the code style.
96
97 }
98
99 override fun initData(model: RegistrationModel, response: SponsorMatchResponse, userData: UserAccountData, contentType: String) {
100 state = state.copy(
101 registrationModel = model,
102 userData = userData,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/video/AutoPlayFragment.kt:34:13Line detected, which is longer than the defined maximum line length in the code style.
31 override fun onCreate(savedInstanceState: Bundle?) {
32 super.onCreate(savedInstanceState)
33 try {
34 analytics.pageView(GeneralAnalytics.Page.VIDEO_AUTOPLAY)?.siteSectionAndContentType(GeneralAnalytics.Page.YOU_SETTINGS)
35 NetworkUtil.isNetworkAvailable(requireContext())
36 } catch (e: Exception) {
37 e("Activity on crate error", e)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/video/AutoPlayFragment.kt:100:5Line detected, which is longer than the defined maximum line length in the code style.
97
98
99 private fun RadioGroup.initRadioButton(radioButton: RadioButton): RadioButton {
100 val layoutParams = RadioGroup.LayoutParams(RadioGroup.LayoutParams.MATCH_PARENT, RadioGroup.LayoutParams.WRAP_CONTENT)
101 layoutParams.leftMargin = resources.getDimensionPixelSize(R.dimen.spacing_s)
102 layoutParams.rightMargin = resources.getDimensionPixelSize(R.dimen.spacing_s)
103 radioButton.layoutParams = layoutParams
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/video/AutoplayViewModelImpl.kt:31:13Line detected, which is longer than the defined maximum line length in the code style.
28 viewModelScope.launch {
29 repository.refreshUserSettings()
30 val item = repository.getAutoPlaySetting()
31 stateFlow.emit(stateFlow.value.copy(selectedItem = item?: VideoAutoplayType.ON.value, loadedItem = item?: VideoAutoplayType.ON.value))
32 }
33 }
34
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_settings/src/main/java/com/sharecare/settings/ui/sections/video/VideoState.kt:6:1Line detected, which is longer than the defined maximum line length in the code style.
3 import com.sharecare.realgreen.core.architecture.ui.state.ScreenPhase
4 import com.sharecare.realgreen.core.architecture.ui.state.StandardScreenState
5
6 data class VideoState(val loadedItem:String? = null, val lock:Boolean = false, val selectedItem: String? = null, override val phase: ScreenPhase = ScreenPhase.Normal) : StandardScreenState
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_shp/src/main/java/com/sharecare/realgreen/feature_shp/presenter/ShpEditPresenter.kt:24:5Line detected, which is longer than the defined maximum line length in the code style.
21 getView().profileDeleted()
22 }
23
24 fun saveChanges(dependent: SecondaryProfile, onSave: () -> Unit) = inParallel(shpRepository.patchDependants(dependent)) {
25 onSave()
26 }
27 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_shp/src/main/java/com/sharecare/realgreen/feature_shp/service/ShpService.kt:21:13Line detected, which is longer than the defined maximum line length in the code style.
18
19 private val bearerProxy: Proxy
20 get() {
21 val url = params.appConfiguration.getNetworkConfiguration().getHostForFeature(NetworkConfigurationType.DEPENDENTS)
22 val uri = Uri.parse(url)
23
24 val httpsHost = "https://${uri.host}"
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_shp/src/main/java/com/sharecare/realgreen/feature_shp/service/ShpService.kt:35:13Line detected, which is longer than the defined maximum line length in the code style.
32
33 private val configQueryParameters: Map<String, String?>
34 get() {
35 val url = params.appConfiguration.getNetworkConfiguration().getHostForFeature(NetworkConfigurationType.DEPENDENTS)
36 return extractQueryParametersAsMap(url)
37 }
38
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_shp/src/main/java/com/sharecare/realgreen/feature_shp/service/ShpService.kt:71:9Line detected, which is longer than the defined maximum line length in the code style.
68
69 private interface Proxy {
70 @PATCH("/health-profile/dependents")
71 fun patchDependants(@Body secondaryProfiles: SecondaryProfiles, @Query("entity") entity: String, @QueryMap extras: Map<String, String?>?): Single<SecondaryProfiles>
72
73 @GET("/health-profile/dependents")
74 fun getDependants(@Query("entity") entity: String, @QueryMap extras: Map<String, String?>?): Single<SecondaryProfiles>
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_shp/src/main/java/com/sharecare/realgreen/feature_shp/service/ShpService.kt:74:9Line detected, which is longer than the defined maximum line length in the code style.
71 fun patchDependants(@Body secondaryProfiles: SecondaryProfiles, @Query("entity") entity: String, @QueryMap extras: Map<String, String?>?): Single<SecondaryProfiles>
72
73 @GET("/health-profile/dependents")
74 fun getDependants(@Query("entity") entity: String, @QueryMap extras: Map<String, String?>?): Single<SecondaryProfiles>
75
76 @HTTP(method = "DELETE", path = "/health-profile/dependents", hasBody = true)
77 fun deleteDependants(@Body ids: List<String>, @Query("entity") entity: String, @QueryMap extras: Map<String, String?>?): Completable
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_shp/src/main/java/com/sharecare/realgreen/feature_shp/service/ShpService.kt:77:9Line detected, which is longer than the defined maximum line length in the code style.
74 fun getDependants(@Query("entity") entity: String, @QueryMap extras: Map<String, String?>?): Single<SecondaryProfiles>
75
76 @HTTP(method = "DELETE", path = "/health-profile/dependents", hasBody = true)
77 fun deleteDependants(@Body ids: List<String>, @Query("entity") entity: String, @QueryMap extras: Map<String, String?>?): Completable
78 }
79 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_shp/src/main/java/com/sharecare/realgreen/feature_shp/view/ShpEditFragment.kt:23:1Line detected, which is longer than the defined maximum line length in the code style.
20 import com.sharecare.realgreen.feature_shp.view.contracts.ShpEditView
21 import org.joda.time.DateTime
22
23 class ShpEditFragment(private val dependentId: String, val onDelete: () -> Unit) : RxFragment<ShpEditPresenter, ShpEditView>(), ShpEditView {
24 var binding: FragmentShpEditBinding? = null
25 var profile: SecondaryProfile? = null
26 var fields: List<Field<*>>? = null
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_shp/src/main/java/com/sharecare/realgreen/feature_shp/view/ShpsListFragment.kt:29:1Line detected, which is longer than the defined maximum line length in the code style.
26
27 typealias ProfileAction = (profile: SecondaryProfile) -> Unit
28
29 class ShpsListFragment(private val onSelection: ProfileAction, private val onAddFinish: ProfileAction) : RxFragment<ShpsListPresenter, ShpsListView>(), ShpsListView {
30 companion object {
31 const val profilesLimit = 10
32 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_shp/src/main/java/com/sharecare/realgreen/feature_shp/view/adapters/ShpsListAdapter.kt:15:1Line detected, which is longer than the defined maximum line length in the code style.
12 import com.sharecare.realgreen.feature_shp.models.SecondaryProfiles
13 import com.sharecare.realgreen.feature_shp.view.ProfileAction
14
15 class ShpsListAdapter(private var data: SecondaryProfiles, val onSelection: ProfileAction, val onDeleteRequest: ProfileAction) : RecyclerView.Adapter<ShpsListAdapter.ViewHolder>() {
16
17 companion object {
18 const val MAX_STRING_LENGTH = 25
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_topics/src/main/java/com/sharecare/realgreen/topics/details/TopicDetailsPresenter.kt:16:1Line detected, which is longer than the defined maximum line length in the code style.
13 import com.sharecare.realgreen.topics.details.repository.TopicRepository
14 import io.reactivex.Single
15
16 class TopicDetailsPresenter private constructor(private val repository: TopicRepository) : BasePresenter<TopicDetailMvpView>() {
17 private var topicId: String? = null
18 private var topic: Topic? = null
19 private var isOnlineSource: Boolean? = null
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_topics/src/main/java/com/sharecare/realgreen/topics/service/TopicsService.kt:43:24Line detected, which is longer than the defined maximum line length in the code style.
40 @Throws(RemoteException::class)
41 fun getContent(@Query("type") types: CommaSeparatedList?, @Query("tag") tags: CommaSeparatedList?,
42 @Query("pageSize") pageSize: Int?, @Query("pageNumber") pageNumber: Int?,
43 @Query("followed") followed: Boolean?, @Query("recommended") recommended: Boolean?): Single<ContentResponse>
44
45 @GET("/content/user/{accountid}/topics")
46 @Throws(RemoteException::class)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_topics/src/main/java/com/sharecare/realgreen/topics/util/TopicNavigator.kt:31:9Line detected, which is longer than the defined maximum line length in the code style.
28 @JvmStatic
29 fun toTopics(context: Context, isTimeLine: Boolean, replaceContainer: Boolean = true) {
30 val controller = (context as NavigationProvider).getNavigationController()
31 controller.goToNextFragment(TopicsListFragment.newInstance(true, false, isTimeLine), replaceInContainer = replaceContainer)
32 }
33
34 @JvmStatic
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_topics/src/main/java/com/sharecare/realgreen/topics/util/TopicNavigator.kt:56:5Line detected, which is longer than the defined maximum line length in the code style.
53
54 @JvmStatic
55 @JvmOverloads
56 fun toTopicDetail(context: Context, topicId: String, tag: AnalyticsTag, analyticsInfo: FeedItemAnalyticsInfo? = null) {
57 toTopicDetails(context) {
58 it.putString(EXTRA_TOPIC_ID, topicId)
59 it.putSerializable(EXTRA_ANALYTICS_TAG, tag)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/database/model/GreenDayExtension.kt:11:17Line detected, which is longer than the defined maximum line length in the code style.
8 // the list of the trackers that should be represented as cards
9 greenDayTrackers?.filter {
10 it.type != null &&
11 ((it.type != TrackerType.MEDICATION_GROUP && it.value == 0 && it.hasNoTrackers()) // is should not have previously submitted trackers
12 || (it.type == TrackerType.MEDICATION_GROUP && it.value == 3)) && // the number 3 is returned by the server and in the case of Medication tracker means that it was not yet submitted
13 !it.isAutomatic(DateTime.now()) // it should not be automatically tracked
14 }?.sortedBy { it.type!!.name } // we sort it alphabetically by the tracker type
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/database/model/GreenDayExtension.kt:12:25Line detected, which is longer than the defined maximum line length in the code style.
9 greenDayTrackers?.filter {
10 it.type != null &&
11 ((it.type != TrackerType.MEDICATION_GROUP && it.value == 0 && it.hasNoTrackers()) // is should not have previously submitted trackers
12 || (it.type == TrackerType.MEDICATION_GROUP && it.value == 3)) && // the number 3 is returned by the server and in the case of Medication tracker means that it was not yet submitted
13 !it.isAutomatic(DateTime.now()) // it should not be automatically tracked
14 }?.sortedBy { it.type!!.name } // we sort it alphabetically by the tracker type
15 ?: listOf()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/database/model/TrackerDataExtension.kt:26:13Line detected, which is longer than the defined maximum line length in the code style.
23 TrackerType.SLEEP -> return TrackerPreferenceStore.getRepo().isSleepAutoTracked()
24 }
25 return false
26 } else return !(this.source != null && (Source.SourceType.SHARECARE.name.equals(this.source.sourceType, true) ||
27 Source.SourceType.USER.name.equals(this.source.sourceType, true)))
28 } else {
29 return false
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/database/model/TrackerDataExtension.kt:44:13Line detected, which is longer than the defined maximum line length in the code style.
41 enumMap.put(TrackerMeasurement.SubmissionMeasurementType.ALCOHOL_DRINKS, value)
42 }
43 TrackerType.BLOOD_PRESSURE -> {
44 enumMap.put(TrackerMeasurement.SubmissionMeasurementType.BLOOD_PRESSURE_SYSTOLIC, (this as BloodPressureTrackerData).systolic)
45 enumMap.put(TrackerMeasurement.SubmissionMeasurementType.BLOOD_PRESSURE_DIASTOLIC, diastolic)
46 }
47 TrackerType.BLOOD_GLUCOSE -> {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/database/model/TrackerDataExtension.kt:65:13Line detected, which is longer than the defined maximum line length in the code style.
62 enumMap.put(TrackerMeasurement.SubmissionMeasurementType.RELATIONSHIP_LEVEL, value)
63 }
64 TrackerType.SLEEP -> {
65 enumMap.put(TrackerMeasurement.SubmissionMeasurementType.SLEEP_BED_TIME, (this as SleepTrackerData).from?.toDateTime()?.millis)
66 enumMap.put(TrackerMeasurement.SubmissionMeasurementType.SLEEP_RISE_TIME, this.to?.toDateTime()?.millis)
67 enumMap.put(TrackerMeasurement.SubmissionMeasurementType.SLEEP_QUALITY, score)
68 // if the source is USER, then we don't need to show "I wasn't sleeping flag"
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/database/model/TrackerDataExtension.kt:69:13Line detected, which is longer than the defined maximum line length in the code style.
66 enumMap.put(TrackerMeasurement.SubmissionMeasurementType.SLEEP_RISE_TIME, this.to?.toDateTime()?.millis)
67 enumMap.put(TrackerMeasurement.SubmissionMeasurementType.SLEEP_QUALITY, score)
68 // if the source is USER, then we don't need to show "I wasn't sleeping flag"
69 enumMap.put(TrackerMeasurement.SubmissionMeasurementType.SLEEP_NO_SLEEP_FLAG_TO_SHOW, source.sourceType != Source.SourceType.USER.name)
70 }
71 TrackerType.SMOKE -> {
72 enumMap.put(TrackerMeasurement.SubmissionMeasurementType.SMOKE_CIGARETTES, value)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/add/diet/ui/DietManualTrackerActivity.kt:92:9Line detected, which is longer than the defined maximum line length in the code style.
89 dietTrackerBinding!!.filledExposedDropdown.setDropDownBackgroundResource(R.color.surface)
90 dietTrackerBinding!!.filledExposedDropdown.setText(MealType.BREAKFAST.getLocalizedName(resources))
91 dietTrackerBinding!!.filledExposedDropdown.setAdapter(mealAdapter)
92 dietTrackerBinding!!.filledExposedDropdown.onItemClickListener = AdapterView.OnItemClickListener { adapterView, view, position, id -> presenter!!.mealTypePosition = position }
93 }
94
95 private fun setQuantityRadioButtons(@IntRange(from = 1,to = 5)quantity: Int){
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/add/diet/ui/DietManualTrackerActivity.kt:108:17Line detected, which is longer than the defined maximum line length in the code style.
105
106 dietTrackerBinding!!.quantityRaidiogroup.setOnCheckedChangeListener { group, checkedId ->
107 when(checkedId){
108 R.id.button_secondary_outlined_dense_rxs -> presenter!!.mealQuantity = DetailedTrackerType.DIET_SIZE_EXTRA_SMALL
109 R.id.button_secondary_outlined_dense_rs -> presenter!!.mealQuantity = DetailedTrackerType.DIET_SIZE_SMALL
110 R.id.button_secondary_outlined_dense_rm -> presenter!!.mealQuantity = DetailedTrackerType.DIET_SIZE_MEDIUM
111 R.id.button_secondary_outlined_dense_rl -> presenter!!.mealQuantity = DetailedTrackerType.DIET_SIZE_LARGE
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/add/diet/ui/DietManualTrackerActivity.kt:109:17Line detected, which is longer than the defined maximum line length in the code style.
106 dietTrackerBinding!!.quantityRaidiogroup.setOnCheckedChangeListener { group, checkedId ->
107 when(checkedId){
108 R.id.button_secondary_outlined_dense_rxs -> presenter!!.mealQuantity = DetailedTrackerType.DIET_SIZE_EXTRA_SMALL
109 R.id.button_secondary_outlined_dense_rs -> presenter!!.mealQuantity = DetailedTrackerType.DIET_SIZE_SMALL
110 R.id.button_secondary_outlined_dense_rm -> presenter!!.mealQuantity = DetailedTrackerType.DIET_SIZE_MEDIUM
111 R.id.button_secondary_outlined_dense_rl -> presenter!!.mealQuantity = DetailedTrackerType.DIET_SIZE_LARGE
112 R.id.button_secondary_outlined_dense_rxl -> presenter!!.mealQuantity = DetailedTrackerType.DIET_SIZE_EXTRA_LARGE
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/add/diet/ui/DietManualTrackerActivity.kt:110:17Line detected, which is longer than the defined maximum line length in the code style.
107 when(checkedId){
108 R.id.button_secondary_outlined_dense_rxs -> presenter!!.mealQuantity = DetailedTrackerType.DIET_SIZE_EXTRA_SMALL
109 R.id.button_secondary_outlined_dense_rs -> presenter!!.mealQuantity = DetailedTrackerType.DIET_SIZE_SMALL
110 R.id.button_secondary_outlined_dense_rm -> presenter!!.mealQuantity = DetailedTrackerType.DIET_SIZE_MEDIUM
111 R.id.button_secondary_outlined_dense_rl -> presenter!!.mealQuantity = DetailedTrackerType.DIET_SIZE_LARGE
112 R.id.button_secondary_outlined_dense_rxl -> presenter!!.mealQuantity = DetailedTrackerType.DIET_SIZE_EXTRA_LARGE
113 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/add/diet/ui/DietManualTrackerActivity.kt:111:17Line detected, which is longer than the defined maximum line length in the code style.
108 R.id.button_secondary_outlined_dense_rxs -> presenter!!.mealQuantity = DetailedTrackerType.DIET_SIZE_EXTRA_SMALL
109 R.id.button_secondary_outlined_dense_rs -> presenter!!.mealQuantity = DetailedTrackerType.DIET_SIZE_SMALL
110 R.id.button_secondary_outlined_dense_rm -> presenter!!.mealQuantity = DetailedTrackerType.DIET_SIZE_MEDIUM
111 R.id.button_secondary_outlined_dense_rl -> presenter!!.mealQuantity = DetailedTrackerType.DIET_SIZE_LARGE
112 R.id.button_secondary_outlined_dense_rxl -> presenter!!.mealQuantity = DetailedTrackerType.DIET_SIZE_EXTRA_LARGE
113 }
114 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/add/diet/ui/DietManualTrackerActivity.kt:112:17Line detected, which is longer than the defined maximum line length in the code style.
109 R.id.button_secondary_outlined_dense_rs -> presenter!!.mealQuantity = DetailedTrackerType.DIET_SIZE_SMALL
110 R.id.button_secondary_outlined_dense_rm -> presenter!!.mealQuantity = DetailedTrackerType.DIET_SIZE_MEDIUM
111 R.id.button_secondary_outlined_dense_rl -> presenter!!.mealQuantity = DetailedTrackerType.DIET_SIZE_LARGE
112 R.id.button_secondary_outlined_dense_rxl -> presenter!!.mealQuantity = DetailedTrackerType.DIET_SIZE_EXTRA_LARGE
113 }
114 }
115 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/add/medication/ui/MedicationAddManualTrackerActivity.kt:115:13Line detected, which is longer than the defined maximum line length in the code style.
112
113 private fun isSaveEnabled(): Boolean {
114 val dosageSelected: Boolean = (0..medicationBinding!!.medicationDosageContainer.childCount - 1).any {
115 (medicationBinding!!.medicationDosageContainer.getChildAt(it) as MedicationDosagePicker).getSelectedDosage() > 0
116 }
117 return presenter!!.isTrackerDataNotNull() || dosageSelected
118 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/add/progress/rating/presenter/RatingTrackerPresenter.kt:8:1Line detected, which is longer than the defined maximum line length in the code style.
5 import com.sharecare.realgreen.core.repository.HelpDismissedSettingsRepository
6 import com.sharecare.realgreen.tracker.presentation.add.progress.base.presenter.ProgressTrackerPresenter
7
8 class RatingTrackerPresenter(private val helpDismissedSettingsRepository: HelpDismissedSettingsRepository = HelpDismissedSettingsDataRepository()) : ProgressTrackerPresenter() {
9 fun createRatingTrackerData(value: Int): TrackerData {
10 var resultTrackerData: TrackerData;
11 if (trackerData == null) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/add/progress/rating/presenter/RatingTrackerPresenter.kt:28:5Line detected, which is longer than the defined maximum line length in the code style.
25 super.saveEntry(createRatingTrackerData(stressIntensity), analyticsValue)
26 }
27
28 fun shouldShowTrackerWizardForSubmission() = helpDismissedSettingsRepository.showAutomaticTrackingWizardAtSubmission()
29 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/add/slider/weight/presenter/WeightTrackerPresenter.kt:10:30Line detected, which is longer than the defined maximum line length in the code style.
7 import com.sharecare.realgreen.tracker.util.TrackerUtil
8
9 class WeightTrackerPresenter(private val unitLocale: UnitLocale,
10 val greenDayConfigurationRepository: GreenDayConfigurationRepository) : SliderTrackerPresenter() {
11
12 val localisedMinWeight: Int
13 get() = if (unitLocale == UnitLocale.US || unitLocale == UnitLocale.UK) MIN_WEIGHT_POUNDS else MIN_WEIGHT_KG
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/add/slider/weight/presenter/WeightTrackerPresenter.kt:42:9Line detected, which is longer than the defined maximum line length in the code style.
39 }
40
41 fun getHeightInMeter(): Double {
42 val configuration = greenDayConfigurationRepository.getConfigurationRecordLocally(TrackerUtil.dateFormatted(selectedDate))
43 return if (configuration != null) {
44 configuration.heightInMeter
45 } else {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/base/presenter/GreenDayBasePresenter.kt:17:51Line detected, which is longer than the defined maximum line length in the code style.
14 import java.io.Serializable
15
16 abstract class GreenDayBasePresenter<T : MvpView>(protected val greenDayRepository: GreenDayRepository,
17 protected var configurationRepository: GreenDayConfigurationRepository,
18 protected var gdtConfiguration: GDTConfiguration)
19 : BasePresenter<T>(), Serializable {
20
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/base/presenter/GreenDayBasePresenter.kt:54:13Line detected, which is longer than the defined maximum line length in the code style.
51
52 protected val isMedicationListNullOrEmpty: Boolean
53 get() {
54 val configuration = configurationRepository.getConfigurationRecordLocally(TrackerUtil.dateFormatted(selectedDate))
55 return configuration == null || configuration.medicationSettings.isNullOrEmpty()
56 }
57
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/base/presenter/GreenDayTrackersBasePresenter.kt:20:77Line detected, which is longer than the defined maximum line length in the code style.
17 import java.util.UUID
18
19 abstract class GreenDayTrackersBasePresenter<MVP : GreenDayTrackersMvpView>(greenDayRepository: GreenDayRepository,
20 configurationRepository: GreenDayConfigurationRepository,
21 protected var trackerRepository: GreenDayTrackerRepository,
22 gdtConfiguration: GDTConfiguration) :
23 GreenDayBasePresenter<MVP>(greenDayRepository, configurationRepository, gdtConfiguration), Serializable {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/base/presenter/GreenDayTrackersBasePresenter.kt:21:77Line detected, which is longer than the defined maximum line length in the code style.
18
19 abstract class GreenDayTrackersBasePresenter<MVP : GreenDayTrackersMvpView>(greenDayRepository: GreenDayRepository,
20 configurationRepository: GreenDayConfigurationRepository,
21 protected var trackerRepository: GreenDayTrackerRepository,
22 gdtConfiguration: GDTConfiguration) :
23 GreenDayBasePresenter<MVP>(greenDayRepository, configurationRepository, gdtConfiguration), Serializable {
24
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/base/presenter/GreenDayTrackersBasePresenter.kt:38:21Line detected, which is longer than the defined maximum line length in the code style.
35 if (type != TrackerType.SLEEP && type != TrackerType.STEPS) { // if it's not a Micro service tracker
36 addDisposable(trackerRepository.deleteTrackerRemotely(id)
37 .withDefaultSchedulers()
38 .map { gdtResponse -> gdtResponse.getGreenDayForDateOrNull(TrackerUtil.dateFormatted(selectedDate)) }
39 .doOnSuccess { greenDay -> greenDayRepository.saveGreenDayLocally(greenDay) }
40 .subscribe({ todaysGreenDay ->
41 this.greenDay = todaysGreenDay
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/base/presenter/GreenDayTrackersBasePresenter.kt:112:9Line detected, which is longer than the defined maximum line length in the code style.
109 greenDay
110 }
111
112 configExists = configurationRepository.getConfigurationRecordLocally(TrackerUtil.dateFormatted(selectedDate)) != null
113
114 return if (configExists) {
115 greenDayObservable
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/base/repository/greenday/GreenDayDataRepository.kt:60:5Line detected, which is longer than the defined maximum line length in the code style.
57 return getGreenDayRemotelySyncroniously(date, forceSync)
58 }
59
60 override fun getGreenDayRangeRemotely(fromDate: String, toDate: String, excludeGreenDayTrackers: Boolean?): Single<GdtResponse> {
61 val service = ServiceFactory.getInstance()
62 .createService(ServiceFactory.ServiceType.GREEN_DAY) as GreenDayService
63 return service.getGreenDaysForRange(fromDate, toDate, excludeGreenDayTrackers)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/base/repository/greenday/GreenDayRepository.kt:20:5Line detected, which is longer than the defined maximum line length in the code style.
17
18 fun getGreenDayRemotely(date: String, forceSync: Boolean): Single<GdtResponse>
19
20 fun getGreenDayRangeRemotely(fromDate: String, toDate: String, excludeGreenDayTrackers: Boolean?): Single<GdtResponse>
21
22 fun getGreenDayCounter(date: String): Int //GdtUtil.getGreenDayCounter
23 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/calendar/ui/TrackerCalendarActivity.kt:24:1Line detected, which is longer than the defined maximum line length in the code style.
21 import com.sharecare.realgreen.tracker.view.calendar.presentation.calendar.ui.CalendarScrollListener
22 import org.joda.time.DateTime
23
24 class TrackerCalendarActivity : AuthenticatedActivity<TrackerCalendarPresenter, TrackerCalendarMvpView>(), TrackerCalendarMvpView {
25 private lateinit var binding: ActivityTrackerCalendarBinding
26
27 override fun onCreate(savedInstanceState: Bundle?) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/calendar/ui/TrackerCalendarActivity.kt:103:13Line detected, which is longer than the defined maximum line length in the code style.
100 override fun onResume() {
101 super.onResume()
102 if (NetworkUtil.isNetworkAvailable(this)) {
103 SocketConnection.registerForSocketConnection(lifecycle, EventType.GDT_UPDATED, object : ClientWebSocket.MessageListener {
104 override fun onSocketMessage(message: String?, params: JsonElement?) {
105 runOnUiThread {
106 clearCalendarData()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/edit/presenter/LogEntriesPresenter.kt:291:25Line detected, which is longer than the defined maximum line length in the code style.
288 } else {
289 greenDay = greenDayRepository.getGreenDayLocally(TrackerUtil.dateFormatted(selectedDate))
290 mvpView.recreateTrackers()
291 this@LogEntriesPresenter.screenDecider(greenDay!!.findGreenDayTrackerByTypeName(request.trackerData!!.type)!!)
292 }
293 }, {
294 val record = trackerRepository.generateRealmRecord(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/gdtpermissions/ui/GdtPermissionsActivity.kt:73:13Line detected, which is longer than the defined maximum line length in the code style.
70 }
71
72 when (PermissionsUtil.checkPermissions(this, permissionList)) {
73 PermissionsUtil.PermissionState.MAY_BE_ASKED, PermissionsUtil.PermissionState.PREVIOUSLY_DENIED -> ActivityCompat.requestPermissions(this,
74 permissionList.permissionNames,
75 RequestCode.PERMISSIONS_MAIN_REQUEST_CODE)
76 PermissionsUtil.PermissionState.PERMANENTLY_DISABLED -> onGoNext()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/gdtpermissions/ui/GdtPermissionsActivity.kt:132:1Line detected, which is longer than the defined maximum line length in the code style.
129
130 override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
131 //TODO: ORIGAMI - this Tool is now a part of ORIGAMI project and won't be used here
132 // if (com.sharecare.realgreen.origami.tool.sources.GoogleFitTool.GOOGLE_FIT_PERMISSIONS_REQUEST_CODE == requestCode) {
133 // pagerAdapter.getItem(binding.pagerIntroduction.currentItem).onActivityResult(requestCode, resultCode, data)
134 // } else {
135 // super.onActivityResult(requestCode, resultCode, data)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/gdtpermissions/ui/GdtPermissionsActivity.kt:133:1Line detected, which is longer than the defined maximum line length in the code style.
130 override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
131 //TODO: ORIGAMI - this Tool is now a part of ORIGAMI project and won't be used here
132 // if (com.sharecare.realgreen.origami.tool.sources.GoogleFitTool.GOOGLE_FIT_PERMISSIONS_REQUEST_CODE == requestCode) {
133 // pagerAdapter.getItem(binding.pagerIntroduction.currentItem).onActivityResult(requestCode, resultCode, data)
134 // } else {
135 // super.onActivityResult(requestCode, resultCode, data)
136 // }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/gdtpermissions/ui/SleepOnboardingActivity.kt:73:5Line detected, which is longer than the defined maximum line length in the code style.
70
71 override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
72 //TODO: ORIGAMI - this Tool is now a part of ORIGAMI project and won't be used here
73 // if (com.sharecare.realgreen.origami.tool.sources.GoogleFitTool.GOOGLE_FIT_PERMISSIONS_REQUEST_CODE == requestCode) {
74 // pagerAdapter.getItem(binding.pagerIntroduction.currentItem).onActivityResult(requestCode, resultCode, data)
75 // } else {
76 // super.onActivityResult(requestCode, resultCode, data)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/gdtpermissions/ui/SleepOnboardingActivity.kt:74:1Line detected, which is longer than the defined maximum line length in the code style.
71 override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
72 //TODO: ORIGAMI - this Tool is now a part of ORIGAMI project and won't be used here
73 // if (com.sharecare.realgreen.origami.tool.sources.GoogleFitTool.GOOGLE_FIT_PERMISSIONS_REQUEST_CODE == requestCode) {
74 // pagerAdapter.getItem(binding.pagerIntroduction.currentItem).onActivityResult(requestCode, resultCode, data)
75 // } else {
76 // super.onActivityResult(requestCode, resultCode, data)
77 // }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/gdtpermissions/ui/SleepOnboardingActivity.kt:86:13Line detected, which is longer than the defined maximum line length in the code style.
83
84 private fun checkPermissions() {
85 when (PermissionsUtil.checkPermissions(this, PermissionsUtil.PermissionValue.MICROPHONE)) {
86 PermissionsUtil.PermissionState.MAY_BE_ASKED, PermissionsUtil.PermissionState.PREVIOUSLY_DENIED -> ActivityCompat.requestPermissions(this,
87 PermissionsUtil.PermissionValue.STRESS_ALL.permissionNames,
88 RequestCode.PERMISSIONS_MAIN_REQUEST_CODE)
89 PermissionsUtil.PermissionState.PERMANENTLY_DISABLED -> showDialogToOpenSettings()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/gdtpermissions/ui/SleepOnboardingSourceFragment.kt:41:1Line detected, which is longer than the defined maximum line length in the code style.
38 // if (!com.sharecare.realgreen.origami.tool.sources.GoogleFitTool.isUserSubscribed(activity!!)) {
39 // com.sharecare.realgreen.origami.tool.sources.GoogleFitTool.subscribeForGoogleFit(activity!!)
40 // } else {
41 // com.sharecare.realgreen.origami.tool.sources.GoogleFitTool.unsubscribeFromGoogleFit(activity!!, object : com.sharecare.realgreen.origami.tool.sources.GoogleFitTool.RequestListener<Void> {
42 // override fun onSuccess(result: Void) {
43 // setupSources()
44 // TrackerSettingsPresenter(TrackerUserSettingsDataRepository(),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/gdtpermissions/ui/SleepOnboardingSourceFragment.kt:59:1Line detected, which is longer than the defined maximum line length in the code style.
56 // }
57 // } else {
58 // Snackbar.make(binding.root, getString(R.string.google_fit_not_installed_message), Snackbar.LENGTH_LONG)
59 // .setAction(getString(R.string.btn_google_fit_not_installed_action)) { com.sharecare.realgreen.origami.tool.sources.GoogleFitTool.openGoogleFitOnPlayStore(activity!!) }.show()
60 // }
61 }
62
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/gdtpermissions/ui/SleepOnboardingSourceFragment.kt:67:1Line detected, which is longer than the defined maximum line length in the code style.
64 //TODO: ORIGAMI - this Tool is now a part of ORIGAMI project and won't be used here
65 // setSourceStatus(binding.googleFitConnect, binding.googleFitDisconnect, binding
66 // .textViewGoogleFit,
67 // com.sharecare.realgreen.origami.tool.sources.GoogleFitTool.isGoogleFitInstalled(activity!!) && com.sharecare.realgreen.origami.tool.sources.GoogleFitTool.isUserSubscribed(activity!!))
68 }
69
70 private fun setSourceStatus(materialButtonConnect: MaterialButton,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/gdtpermissions/ui/SleepOnboardingSourceFragment.kt:82:1Line detected, which is longer than the defined maximum line length in the code style.
79 override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
80 if (resultCode == Activity.RESULT_OK) {
81 //TODO: ORIGAMI - this Tool is now a part of ORIGAMI project and won't be used here
82 // if (com.sharecare.realgreen.origami.tool.sources.GoogleFitTool.GOOGLE_FIT_PERMISSIONS_REQUEST_CODE == requestCode) {
83 // setupSources()
84 // TrackerSettingsPresenter(TrackerUserSettingsDataRepository())
85 // .onGoogleFitChangedTo(true)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/gdtstack/presenter/GreendayStackPresenter.kt:43:30Line detected, which is longer than the defined maximum line length in the code style.
40 trackerRepository: GreenDayTrackerRepository,
41 private val trackerMsRepository: GreenDayTrackerMsRepository,
42 configuration: GDTConfiguration,
43 private val healthProfileRepository: HealthProfileRepository) : GreenDayTrackersBasePresenter<GreenDayStackMvpView>(greenDayRepository, configurationRepository, trackerRepository, configuration), Serializable {
44 private val MIN_THRESHOLD = 4
45 private var alreadyInGreen: Boolean = false
46 private var numOfSubmittedTrackers: Int = 0
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/gdtstack/presenter/GreendayStackPresenter.kt:54:13Line detected, which is longer than the defined maximum line length in the code style.
51
52 val heightInMeter: Double
53 get() {
54 val configuration = configurationRepository.getConfigurationRecordLocally(TrackerUtil.dateFormatted(selectedDate))
55 return if (configuration != null)
56 configuration.heightInMeter
57 else
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/gdtstack/presenter/GreendayStackPresenter.kt:63:13Line detected, which is longer than the defined maximum line length in the code style.
60
61 val trackedMedications: List<MedicationSetting>?
62 get() {
63 val configuration = configurationRepository.getConfigurationRecordLocally(TrackerUtil.dateFormatted(selectedDate))
64 return if (configuration != null)
65 configuration.medicationSettings
66 else
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/gdtstack/presenter/GreendayStackPresenter.kt:75:13Line detected, which is longer than the defined maximum line length in the code style.
72
73 private val medicationList: List<MedicationSetting>?
74 get() {
75 val configuration = configurationRepository.getConfigurationRecordLocally(TrackerUtil.dateFormatted(selectedDate))
76 return if (configuration != null)
77 configuration.medicationSettings
78 else
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/gdtstack/presenter/GreendayStackPresenter.kt:98:17Line detected, which is longer than the defined maximum line length in the code style.
95 var needToLoadMedicationDetails = false
96 greenDay?.greenDayTrackers?.forEach {
97 if (it.type == TrackerType.MEDICATION_GROUP) {
98 val configurationRecord = configurationRepository.getConfigurationRecordLocally(TrackerUtil.dateFormatted(selectedDate))
99 if (configurationRecord != null && configurationRecord.medicationSettings != null &&
100 !configurationRecord.medicationSettings.isNullOrEmpty()) { //WE WANT TO SHOW CARD ONLY IF YOU HAVE SOME DATA
101 needToLoadMedicationDetails = true
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/gdtstack/presenter/GreendayStackPresenter.kt:100:25Line detected, which is longer than the defined maximum line length in the code style.
97 if (it.type == TrackerType.MEDICATION_GROUP) {
98 val configurationRecord = configurationRepository.getConfigurationRecordLocally(TrackerUtil.dateFormatted(selectedDate))
99 if (configurationRecord != null && configurationRecord.medicationSettings != null &&
100 !configurationRecord.medicationSettings.isNullOrEmpty()) { //WE WANT TO SHOW CARD ONLY IF YOU HAVE SOME DATA
101 needToLoadMedicationDetails = true
102 mvpView.addPage(it)
103 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/gdtstack/presenter/GreendayStackPresenter.kt:131:29Line detected, which is longer than the defined maximum line length in the code style.
128 addDisposable(greenDayRepository.getGreenDayRemotely(TrackerUtil.dateFormatted(selectedDate))
129 .doOnSuccess { gdtResponse ->
130 greenDayRepository.saveGreenDayLocally(gdtResponse)
131 this@GreendayStackPresenter.greenDay = greenDayRepository.getGreenDayLocally(TrackerUtil.dateFormatted(selectedDate))
132 }
133 .withDefaultSchedulers()
134 .subscribe({ this@GreendayStackPresenter.nextScreenDecider() }, {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/gdtstack/presenter/GreendayStackPresenter.kt:297:9Line detected, which is longer than the defined maximum line length in the code style.
294 mvpView.showAchievementNoDuesGreenDayScreen()
295 } else if (mvpView.isAdapterEmpty && this.greenDay!!.trackersToGreenDay != 0) {
296 mvpView.showAchievementNoDuesNoGreenDayScreen(this.greenDay!!.trackersToGreenDay)
297 } else if (!mvpView.isAdapterEmpty && this.greenDay!!.trackersToGreenDay == 0 && numOfSubmittedTrackers > 0 && !alreadyInGreen) {
298 mvpView.showAchievementGreenDayScreen()
299 } else if (numOfSubmittedTrackers >= MIN_THRESHOLD) {
300 mvpView.showAchievementDueNoGreenScreen(this.greenDay!!.trackersToGreenDay)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/gdtstack/ui/GdtDietView.kt:53:9Line detected, which is longer than the defined maximum line length in the code style.
50 setupMealDropdown()
51 setQuantityRadiobuttons()
52 binding!!.view.textViewSize.text = resources.getString(R.string.quantity)
53 binding!!.view.textViewQuality.text = DietUtil.getQualityText(resources, TrackerType.DIET.defaultStressValue - 1)
54 binding!!.view.seekBarQuality.progress = TrackerType.DIET.defaultStressValue - 1
55
56 binding!!.view.seekBarQuality.setOnSeekBarChangeListener(object : SeekBar.OnSeekBarChangeListener {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/gdtstack/ui/GdtDietView.kt:85:9Line detected, which is longer than the defined maximum line length in the code style.
82 binding!!.view.filledExposedDropdown.setDropDownBackgroundResource(R.color.surface)
83 binding!!.view.filledExposedDropdown.setText(MealType.BREAKFAST.getLocalizedName(resources))
84 binding!!.view.filledExposedDropdown.setAdapter(mealAdapter)
85 binding!!.view.filledExposedDropdown.onItemClickListener = AdapterView.OnItemClickListener { parent, view, position, id -> mealType = position }
86 }
87
88 fun getMealType(): MealType {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/gdtstack/ui/GdtDietView.kt:104:17Line detected, which is longer than the defined maximum line length in the code style.
101 binding!!.view.quantityRaidiogroup.check(R.id.button_secondary_outlined_dense_rm)
102 binding!!.view.quantityRaidiogroup.setOnCheckedChangeListener { group, checkedId ->
103 when(checkedId){
104 R.id.button_secondary_outlined_dense_rxs -> sizeValue = DetailedTrackerType.DIET_SIZE_EXTRA_SMALL.value.toInt()
105 R.id.button_secondary_outlined_dense_rs -> sizeValue = DetailedTrackerType.DIET_SIZE_SMALL.value.toInt()
106 R.id.button_secondary_outlined_dense_rm -> sizeValue = DetailedTrackerType.DIET_SIZE_MEDIUM.value.toInt()
107 R.id.button_secondary_outlined_dense_rl -> sizeValue = DetailedTrackerType.DIET_SIZE_LARGE.value.toInt()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/gdtstack/ui/GdtDietView.kt:106:17Line detected, which is longer than the defined maximum line length in the code style.
103 when(checkedId){
104 R.id.button_secondary_outlined_dense_rxs -> sizeValue = DetailedTrackerType.DIET_SIZE_EXTRA_SMALL.value.toInt()
105 R.id.button_secondary_outlined_dense_rs -> sizeValue = DetailedTrackerType.DIET_SIZE_SMALL.value.toInt()
106 R.id.button_secondary_outlined_dense_rm -> sizeValue = DetailedTrackerType.DIET_SIZE_MEDIUM.value.toInt()
107 R.id.button_secondary_outlined_dense_rl -> sizeValue = DetailedTrackerType.DIET_SIZE_LARGE.value.toInt()
108 R.id.button_secondary_outlined_dense_rxl -> sizeValue = DetailedTrackerType.DIET_SIZE_EXTRA_LARGE.value.toInt()
109 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/gdtstack/ui/GdtDietView.kt:108:17Line detected, which is longer than the defined maximum line length in the code style.
105 R.id.button_secondary_outlined_dense_rs -> sizeValue = DetailedTrackerType.DIET_SIZE_SMALL.value.toInt()
106 R.id.button_secondary_outlined_dense_rm -> sizeValue = DetailedTrackerType.DIET_SIZE_MEDIUM.value.toInt()
107 R.id.button_secondary_outlined_dense_rl -> sizeValue = DetailedTrackerType.DIET_SIZE_LARGE.value.toInt()
108 R.id.button_secondary_outlined_dense_rxl -> sizeValue = DetailedTrackerType.DIET_SIZE_EXTRA_LARGE.value.toInt()
109 }
110 }
111 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/gdtstack/ui/trackerms/numeric/GdtBloodPressureInputView.kt:49:9Line detected, which is longer than the defined maximum line length in the code style.
46 setButtonEnabled(setSaveEnabledCondition())
47 }
48 })
49 binding.inputViewSecond.setupWithValues(initialValues[1], NumericViewType.TEXT, object : OnValueUpdatedListener {
50 override fun onValueUpdated() {
51 setButtonEnabled(setSaveEnabledCondition())
52 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/gdtstack/ui/trackerms/numeric/GdtStepsInputView.kt:46:5Line detected, which is longer than the defined maximum line length in the code style.
43 presenter.createOrUpdateMsTracker()
44 }
45
46 override fun initUiWithValues(@Size(min = 1) initialValues: List<Pair<TrackerMeasurement.MeasurementType, Double?>>) {
47 binding.inputView.setupWithValues(initialValues[0], NumericViewType.TEXT, object : OnValueUpdatedListener {
48 override fun onValueUpdated() {
49 setButtonEnabled(setSaveEnabledCondition())
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/gdtstack/ui/trackerms/numeric/GdtStepsInputView.kt:57:5Line detected, which is longer than the defined maximum line length in the code style.
54
55 override fun setSaveEnabledCondition(): Boolean = provideTrackerValues().isNotEmpty()
56
57 override fun provideTrackerValues(): List<Pair<String, Double>> = listOfNotNull(binding.inputView.provideUnitValuePair())
58
59 override fun syncStepsRightNow() {
60 StepsTrackingWrapper.syncStepsRightNow(context)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/model/InfoPage.kt:15:5Line detected, which is longer than the defined maximum line length in the code style.
12 @StringRes val buttonsPostfix: Int,
13 val settingType: SettingType
14 ) {
15 STEPS(R.drawable.tofu_automatic_step, R.string.automatic_tracking_steps_title, R.string.automatic_tracking_steps_description, R.string.automatic_tracking_steps_postfix, SettingType.STEPS),
16 SLEEP(R.drawable.tofu_automatic_sleep, R.string.automatic_tracking_sleep_title, R.string.automatic_tracking_sleep_description, R.string.automatic_tracking_sleep_postfix, SettingType.SLEEP)
17 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/model/InfoPage.kt:16:5Line detected, which is longer than the defined maximum line length in the code style.
13 val settingType: SettingType
14 ) {
15 STEPS(R.drawable.tofu_automatic_step, R.string.automatic_tracking_steps_title, R.string.automatic_tracking_steps_description, R.string.automatic_tracking_steps_postfix, SettingType.STEPS),
16 SLEEP(R.drawable.tofu_automatic_sleep, R.string.automatic_tracking_sleep_title, R.string.automatic_tracking_sleep_description, R.string.automatic_tracking_sleep_postfix, SettingType.SLEEP)
17 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/presenter/AutomaticTrackingInfoPresenter.kt:12:1Line detected, which is longer than the defined maximum line length in the code style.
9 import com.sharecare.realgreen.tracker.repository.TrackerUserSettingsRepository
10 import com.sharecare.realgreen.tracker.repository.greenday.TrackerUserSettingsDataRepository
11
12 class AutomaticTrackingInfoPresenter(private val trackerUserSettingsRepository: TrackerUserSettingsRepository = TrackerUserSettingsDataRepository()) : MvpPresenter<AutomaticInfoTrackingMvp>() {
13
14 override fun onViewAttached() {
15 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/presenter/AutomaticTrackingIntroPresenter.kt:10:1Line detected, which is longer than the defined maximum line length in the code style.
7 import com.sharecare.realgreen.tracker.presentation.info.model.WizardType
8 import com.sharecare.realgreen.tracker.presentation.info.ui.AutomaticIntroTrackingMvp
9
10 class AutomaticTrackingIntroPresenter(private val helpDismissedSettingsRepository: HelpDismissedSettingsRepository = HelpDismissedSettingsDataRepository()) : BasePresenter<AutomaticIntroTrackingMvp>() {
11
12 fun setUpWizardShowed(wizardType: WizardType) {
13 when (wizardType) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/presenter/AutomaticTrackingSwitchPresenter.kt:12:40Line detected, which is longer than the defined maximum line length in the code style.
9 import com.sharecare.realgreen.tracker.repository.TrackerUserSettingsRepository
10
11 class AutomaticTrackingSwitchPresenter(trackerUserSettingsRepository: TrackerUserSettingsRepository,
12 private val helpDismissedSettingsRepository: HelpDismissedSettingsRepository = HelpDismissedSettingsDataRepository()
13 ) :
14 TrackerSettingsGeneralExtendedPresenter<AutomaticTrackingSwitchMvpView>(trackerUserSettingsRepository) {
15
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/ui/AutomaticTrackingDataSourceFragment.kt:86:1Line detected, which is longer than the defined maximum line length in the code style.
83 private fun updateSourcesStatus() = with(binding.containerDataSource) {
84 //TODO: ORIGAMI - this Tool is now a part of ORIGAMI project and won't be used here
85 // setSourceStatus(googleFitConnect, googleFitDisconnect,
86 // textViewGoogleFit, com.sharecare.realgreen.origami.tool.sources.GoogleFitTool.isGoogleFitInstalled(context!!) && com.sharecare.realgreen.origami.tool.sources.GoogleFitTool.isUserSubscribed(context!!))
87
88 setSourceStatus(fitbitConnect, fitbitDisconnect, textViewFitbit, TrackerPreferenceStore.getRepo().isFitBitConnected())
89 setSourceStatus(samsungHealthConnect, samsungHealthDisconnect, samsungHealthStatus, TrackerPreferenceStore.getRepo().isSamsungHealthConnected())
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/ui/AutomaticTrackingDataSourceFragment.kt:88:9Line detected, which is longer than the defined maximum line length in the code style.
85 // setSourceStatus(googleFitConnect, googleFitDisconnect,
86 // textViewGoogleFit, com.sharecare.realgreen.origami.tool.sources.GoogleFitTool.isGoogleFitInstalled(context!!) && com.sharecare.realgreen.origami.tool.sources.GoogleFitTool.isUserSubscribed(context!!))
87
88 setSourceStatus(fitbitConnect, fitbitDisconnect, textViewFitbit, TrackerPreferenceStore.getRepo().isFitBitConnected())
89 setSourceStatus(samsungHealthConnect, samsungHealthDisconnect, samsungHealthStatus, TrackerPreferenceStore.getRepo().isSamsungHealthConnected())
90 }
91
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/ui/AutomaticTrackingDataSourceFragment.kt:89:9Line detected, which is longer than the defined maximum line length in the code style.
86 // textViewGoogleFit, com.sharecare.realgreen.origami.tool.sources.GoogleFitTool.isGoogleFitInstalled(context!!) && com.sharecare.realgreen.origami.tool.sources.GoogleFitTool.isUserSubscribed(context!!))
87
88 setSourceStatus(fitbitConnect, fitbitDisconnect, textViewFitbit, TrackerPreferenceStore.getRepo().isFitBitConnected())
89 setSourceStatus(samsungHealthConnect, samsungHealthDisconnect, samsungHealthStatus, TrackerPreferenceStore.getRepo().isSamsungHealthConnected())
90 }
91
92 private fun setSourceStatus(materialButtonConnect: MaterialButton,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/ui/AutomaticTrackingDataSourceFragment.kt:126:1Line detected, which is longer than the defined maximum line length in the code style.
123 // showMessage(
124 // getString(R.string.google_fit_not_installed_message),
125 // getString(R.string.btn_google_fit_not_installed_action),
126 // View.OnClickListener { com.sharecare.realgreen.origami.tool.sources.GoogleFitTool.openGoogleFitOnPlayStore(context!!) }, Snackbar.LENGTH_LONG)
127 // }
128 }
129
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/ui/AutomaticTrackingDataSourceFragment.kt:135:1Line detected, which is longer than the defined maximum line length in the code style.
132 disconnectFitbit()
133 } else {
134 //TODO: ORIGAMI - this Tool is now a part of ORIGAMI project and won't be used here
135 // com.sharecare.realgreen.origami.tool.sources.FitbitTool.toAuthorizePage(this, FITBIT_REDIRECT_SCHEME_TRACKER_WIZARD)
136 }
137 }
138
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/ui/AutomaticTrackingDataSourceFragment.kt:144:1Line detected, which is longer than the defined maximum line length in the code style.
141 disconnectSamsungHealth()
142 } else {
143 //TODO: ORIGAMI - this Tool is now a part of ORIGAMI project and won't be used here
144 // com.sharecare.realgreen.origami.tool.sources.SamsungHealthTool.toAuthorizePage(context!!, SAMSUNG_REDIRECT_SCHEME_TRACKER_WIZARD)
145 }
146 }
147
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/ui/AutomaticTrackingDataSourceFragment.kt:152:9Line detected, which is longer than the defined maximum line length in the code style.
149 if (disableTrackers) R.string.unsubscribe_message_connected_data_sources else R.string.unsubscribe_message)
150
151 private fun disconnectGoogleFit() {
152 val disableTrackers = presenter!!.isOnlyConnectedDataSourceWithNoPermissionGranted(requireContext(), TrackerUserSettingType.GOOGLE_FIT)
153 DialogTool.showConfirmationDialog(requireContext(), String.format(getString(R.string.unsubscribe_title), getString(R.string.google_fit)),
154 String.format(getDisconnectMessage(disableTrackers), getString(R.string.google_fit)),
155 getString(R.string.btn_ok),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/ui/AutomaticTrackingDataSourceFragment.kt:153:9Line detected, which is longer than the defined maximum line length in the code style.
150
151 private fun disconnectGoogleFit() {
152 val disableTrackers = presenter!!.isOnlyConnectedDataSourceWithNoPermissionGranted(requireContext(), TrackerUserSettingType.GOOGLE_FIT)
153 DialogTool.showConfirmationDialog(requireContext(), String.format(getString(R.string.unsubscribe_title), getString(R.string.google_fit)),
154 String.format(getDisconnectMessage(disableTrackers), getString(R.string.google_fit)),
155 getString(R.string.btn_ok),
156 getString(R.string.btn_cancel)) { _, _ ->
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/ui/AutomaticTrackingDataSourceFragment.kt:159:1Line detected, which is longer than the defined maximum line length in the code style.
156 getString(R.string.btn_cancel)) { _, _ ->
157 if (isNetworkAvailable()) {
158 //TODO: ORIGAMI - this Tool is now a part of ORIGAMI project and won't be used here
159 // com.sharecare.realgreen.origami.tool.sources.GoogleFitTool.unsubscribeFromGoogleFit(context!!, object : com.sharecare.realgreen.origami.tool.sources.GoogleFitTool.RequestListener<Void> {
160 // override fun onSuccess(result: Void) {
161 // }
162 //
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/ui/AutomaticTrackingDataSourceFragment.kt:183:9Line detected, which is longer than the defined maximum line length in the code style.
180 }
181
182 private fun disconnectFitbit() {
183 val disableTrackers = presenter!!.isOnlyConnectedDataSourceWithNoPermissionGranted(requireContext(), TrackerUserSettingType.FIT_BIT)
184 DialogTool.showConfirmationDialog(requireContext(), String.format(getString(R.string.unsubscribe_title), getString(R.string.fitbit)),
185 String.format(getDisconnectMessage(disableTrackers), getString(R.string.fitbit)),
186 getString(R.string.btn_ok),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/ui/AutomaticTrackingDataSourceFragment.kt:184:9Line detected, which is longer than the defined maximum line length in the code style.
181
182 private fun disconnectFitbit() {
183 val disableTrackers = presenter!!.isOnlyConnectedDataSourceWithNoPermissionGranted(requireContext(), TrackerUserSettingType.FIT_BIT)
184 DialogTool.showConfirmationDialog(requireContext(), String.format(getString(R.string.unsubscribe_title), getString(R.string.fitbit)),
185 String.format(getDisconnectMessage(disableTrackers), getString(R.string.fitbit)),
186 getString(R.string.btn_ok),
187 getString(R.string.btn_cancel)) { dialog, which ->
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/ui/AutomaticTrackingDataSourceFragment.kt:208:9Line detected, which is longer than the defined maximum line length in the code style.
205 }
206
207 private fun disconnectSamsungHealth() {
208 val disableTrackers = presenter!!.isOnlyConnectedDataSourceWithNoPermissionGranted(requireContext(), TrackerUserSettingType.SAMSUNG_HEALTH)
209 DialogTool.showConfirmationDialog(requireContext(), String.format(getString(R.string.unsubscribe_title), getString(R.string.samsung_health)),
210 String.format(getDisconnectMessage(disableTrackers), getString(R.string.samsung_health)),
211 getString(R.string.btn_ok),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/ui/AutomaticTrackingDataSourceFragment.kt:209:9Line detected, which is longer than the defined maximum line length in the code style.
206
207 private fun disconnectSamsungHealth() {
208 val disableTrackers = presenter!!.isOnlyConnectedDataSourceWithNoPermissionGranted(requireContext(), TrackerUserSettingType.SAMSUNG_HEALTH)
209 DialogTool.showConfirmationDialog(requireContext(), String.format(getString(R.string.unsubscribe_title), getString(R.string.samsung_health)),
210 String.format(getDisconnectMessage(disableTrackers), getString(R.string.samsung_health)),
211 getString(R.string.btn_ok),
212 getString(R.string.btn_cancel)) { dialog, which ->
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/ui/AutomaticTrackingDataSourceFragment.kt:214:1Line detected, which is longer than the defined maximum line length in the code style.
211 getString(R.string.btn_ok),
212 getString(R.string.btn_cancel)) { dialog, which ->
213 //TODO: ORIGAMI - this Tool is now a part of ORIGAMI project and won't be used here
214 // com.sharecare.realgreen.origami.tool.sources.SamsungHealthTool.optOut(object : com.sharecare.realgreen.origami.tool.sources.RequestListener {
215 // override fun onSuccess() {
216 // TrackerPreferenceStore.getRepo().setSamsungHealthConnected(false)
217 // presenter!!.onSamsungHealthChangedTo(false)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/ui/AutomaticTrackingDataSourceFragment.kt:234:1Line detected, which is longer than the defined maximum line length in the code style.
231
232 private fun optInFitBitTrackerSource(token: String) {
233 //TODO: ORIGAMI - this Tool is now a part of ORIGAMI project and won't be used here
234 // com.sharecare.realgreen.origami.tool.sources.FitbitTool.optInIfValid(token, FITBIT_REDIRECT_SCHEME_TRACKER_WIZARD, object : com.sharecare.realgreen.origami.tool.sources.RequestListener {
235 // override fun onSuccess() {
236 // TrackerSourceConfirmationActivity.start(activity!!, Source.SourceType.FITBIT)
237 // TrackerPreferenceStore.getRepo().setFitbitConnected(true)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/ui/AutomaticTrackingDataSourceFragment.kt:251:1Line detected, which is longer than the defined maximum line length in the code style.
248
249 private fun optInSamsungHealthTrackerSource(token: String) {
250 //TODO: ORIGAMI - this Tool is now a part of ORIGAMI project and won't be used here
251 // com.sharecare.realgreen.origami.tool.sources.SamsungHealthTool.optIn(token, SAMSUNG_REDIRECT_SCHEME_TRACKER_WIZARD, object : com.sharecare.realgreen.origami.tool.sources.RequestListener {
252 // override fun onSuccess() {
253 // TrackerSourceConfirmationActivity.start(activity!!, Source.SourceType.SAMSUNG)
254 // TrackerPreferenceStore.getRepo().setSamsungHealthConnected(false)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/ui/AutomaticTrackingDataSourceFragment.kt:267:9Line detected, which is longer than the defined maximum line length in the code style.
264 }
265
266 private fun showTrackerSourceError(sourceType: Source.SourceType) {
267 TrackerSourceErrorActivity.startActivityForResult(requireActivity(), TRACKER_ERROR_ACTIVITY_RESULT_CODE, sourceType)
268 }
269
270 private fun passTheDeeplink(deepLinkUrl: String) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/ui/AutomaticTrackingDataSourceFragment.kt:299:1Line detected, which is longer than the defined maximum line length in the code style.
296 override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
297 super.onActivityResult(requestCode, resultCode, data)
298 //TODO: ORIGAMI - this Tool is now a part of ORIGAMI project and won't be used here
299 // if (com.sharecare.realgreen.origami.tool.sources.GoogleFitTool.GOOGLE_FIT_PERMISSIONS_REQUEST_CODE == requestCode && resultCode == Activity.RESULT_OK) {
300 // TrackerSourceConfirmationActivity.start(activity!!, Source.SourceType.GOOGLE_FIT)
301 // com.sharecare.realgreen.origami.tool.sources.GoogleFitTool.setConnected()
302 // updateSourcesStatus()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/ui/AutomaticTrackingDataSourceFragment.kt:308:1Line detected, which is longer than the defined maximum line length in the code style.
305 // && data!!.getBooleanExtra(TrackerSourceErrorActivity.EXTRA_NEEDS_RETRY, false)) {
306 // when (data.getSerializableExtra(EXTRA_SOURCE_TYPE) as Source.SourceType) {
307 //TODO: ORIGAMI - this Tool is now a part of ORIGAMI project and won't be used here
308 // Source.SourceType.FITBIT -> com.sharecare.realgreen.origami.tool.sources.FitbitTool.toAuthorizePage(context!!, FITBIT_REDIRECT_SCHEME_TRACKER_WIZARD)
309 //TODO: ORIGAMI - this Tool is now a part of ORIGAMI project and won't be used here
310 // Source.SourceType.SAMSUNG -> com.sharecare.realgreen.origami.tool.sources.SamsungHealthTool.toAuthorizePage(context!!, SAMSUNG_REDIRECT_SCHEME_TRACKER_WIZARD)
311 //TODO: ORIGAMI - this Tool is now a part of ORIGAMI project and won't be used here
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/ui/AutomaticTrackingDataSourceFragment.kt:310:1Line detected, which is longer than the defined maximum line length in the code style.
307 //TODO: ORIGAMI - this Tool is now a part of ORIGAMI project and won't be used here
308 // Source.SourceType.FITBIT -> com.sharecare.realgreen.origami.tool.sources.FitbitTool.toAuthorizePage(context!!, FITBIT_REDIRECT_SCHEME_TRACKER_WIZARD)
309 //TODO: ORIGAMI - this Tool is now a part of ORIGAMI project and won't be used here
310 // Source.SourceType.SAMSUNG -> com.sharecare.realgreen.origami.tool.sources.SamsungHealthTool.toAuthorizePage(context!!, SAMSUNG_REDIRECT_SCHEME_TRACKER_WIZARD)
311 //TODO: ORIGAMI - this Tool is now a part of ORIGAMI project and won't be used here
312 // Source.SourceType.GOOGLE_FIT -> com.sharecare.realgreen.origami.tool.sources.GoogleFitTool.subscribeForGoogleFit(activity!!)
313 // else -> {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/ui/AutomaticTrackingDataSourceFragment.kt:312:1Line detected, which is longer than the defined maximum line length in the code style.
309 //TODO: ORIGAMI - this Tool is now a part of ORIGAMI project and won't be used here
310 // Source.SourceType.SAMSUNG -> com.sharecare.realgreen.origami.tool.sources.SamsungHealthTool.toAuthorizePage(context!!, SAMSUNG_REDIRECT_SCHEME_TRACKER_WIZARD)
311 //TODO: ORIGAMI - this Tool is now a part of ORIGAMI project and won't be used here
312 // Source.SourceType.GOOGLE_FIT -> com.sharecare.realgreen.origami.tool.sources.GoogleFitTool.subscribeForGoogleFit(activity!!)
313 // else -> {
314 // }
315 // }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/ui/AutomaticTrackingDataSourceFragment.kt:355:9Line detected, which is longer than the defined maximum line length in the code style.
352 }
353
354 companion object {
355 private const val CODE_PARAMETER_NAME = "code" //TODO: ORIGAMI – replace it with OrigamiSettingsLinkParser.CODE_PARAMETER_NAME once tracker module will be merged with ORIGAMI
356 }
357 }
358
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/ui/AutomaticTrackingInfoActivity.kt:18:1Line detected, which is longer than the defined maximum line length in the code style.
15 import com.sharecare.realgreen.tracker.presentation.info.presenter.AutomaticTrackingInfoPresenter
16 import com.sharecare.realgreen.tracker.presentation.settings.ui.TrackerSettingsChangeListener
17
18 class AutomaticTrackingInfoActivity : BaseMvpActivity<AutomaticTrackingInfoPresenter, AutomaticInfoTrackingMvp>(), AutomaticInfoTrackingMvp {
19 private lateinit var binding: ActivityTrackingInfoBinding
20 private lateinit var viewPager: ViewPager2
21 private lateinit var itemsToShow: MutableList<InfoPage>
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/ui/AutomaticTrackingInfoActivity.kt:102:9Line detected, which is longer than the defined maximum line length in the code style.
99 }
100
101 private fun updateButtonText(position: Int) {
102 binding.keepButton.text = makeText(resources, R.string.btn_automatic_tracking_keep_tracking, itemsToShow[position].buttonsPostfix)
103 binding.stopButton.text = makeText(resources, R.string.btn_automatic_tracking_stop_tracking, itemsToShow[position].buttonsPostfix)
104 }
105
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/ui/AutomaticTrackingInfoActivity.kt:103:9Line detected, which is longer than the defined maximum line length in the code style.
100
101 private fun updateButtonText(position: Int) {
102 binding.keepButton.text = makeText(resources, R.string.btn_automatic_tracking_keep_tracking, itemsToShow[position].buttonsPostfix)
103 binding.stopButton.text = makeText(resources, R.string.btn_automatic_tracking_stop_tracking, itemsToShow[position].buttonsPostfix)
104 }
105
106 private fun createPages(): MutableList<InfoPage> {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/ui/AutomaticTrackingIntroFragment.kt:21:1Line detected, which is longer than the defined maximum line length in the code style.
18 import com.sharecare.realgreen.tracker.presentation.info.model.WizardType
19 import com.sharecare.realgreen.tracker.presentation.info.presenter.AutomaticTrackingIntroPresenter
20
21 class AutomaticTrackingIntroFragment : BaseFragment<AutomaticTrackingIntroPresenter, AutomaticIntroTrackingMvp>(), AutomaticIntroTrackingMvp, NavigationSuppressor {
22
23 private lateinit var binding: FragmentAutomaticTrackingIntroBinding
24 private lateinit var wizardType: WizardType
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/ui/AutomaticTrackingSwitchFragment.kt:75:5Line detected, which is longer than the defined maximum line length in the code style.
72 }
73 }
74
75 override fun showDataSourceDialog(title: String, message: String, arrayAdapter: ArrayAdapter<String>, onItemClickListener: AdapterView.OnItemClickListener) {
76 DialogTool.showTextListDialog(requireActivity(), title, message, arrayAdapter, onItemClickListener)
77 }
78
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/ui/AutomaticTrackingSwitchFragment.kt:85:9Line detected, which is longer than the defined maximum line length in the code style.
82 }
83
84 private fun setupTrackers() = with(binding.containerTrackers) {
85 switchSleep.setOnCheckedChangeListener { _, isChecked -> presenter!!.onTrackerValueChanged(TrackerUserSettingType.SLEEP, isChecked) }
86 sleepLayout.setOnClickListener {
87 binding.containerTrackers.switchSleep.isChecked = !binding.containerTrackers.switchSleep.isChecked
88 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/ui/AutomaticTrackingSwitchFragment.kt:122:1Line detected, which is longer than the defined maximum line length in the code style.
119 // if (!com.sharecare.realgreen.origami.tool.sources.GoogleFitTool.isUserSubscribed(requireContext())) {
120 // com.sharecare.realgreen.origami.tool.sources.GoogleFitTool.subscribeForGoogleFit(requireActivity())
121 // } else {
122 // DialogTool.showConfirmationDialog(requireContext(), String.format(getString(R.string.unsubscribe_title), getString(R.string.google_fit)),
123 // String.format(getString(R.string.unsubscribe_message), getString(R.string.google_fit)),
124 // getString(R.string.btn_ok),
125 // getString(R.string.btn_ok)) { _, _ ->
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/ui/AutomaticTrackingSwitchFragment.kt:127:1Line detected, which is longer than the defined maximum line length in the code style.
124 // getString(R.string.btn_ok),
125 // getString(R.string.btn_ok)) { _, _ ->
126 // if (isNetworkAvailable()) {
127 // com.sharecare.realgreen.origami.tool.sources.GoogleFitTool.unsubscribeFromGoogleFit(requireContext(), object : com.sharecare.realgreen.origami.tool.sources.GoogleFitTool.RequestListener<Void> {
128 // override fun onSuccess(result: Void) {
129 // }
130 //
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/ui/AutomaticTrackingSwitchFragment.kt:148:1Line detected, which is longer than the defined maximum line length in the code style.
145 // }
146 // } else {
147 // Snackbar.make(binding.root, getString(R.string.google_fit_not_installed_message), Snackbar.LENGTH_LONG)
148 // .setAction(getString(R.string.btn_google_fit_not_installed_action)) { com.sharecare.realgreen.origami.tool.sources.GoogleFitTool.openGoogleFitOnPlayStore(requireContext()) }.show()
149 // }
150 }
151
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/ui/AutomaticTrackingSwitchFragment.kt:157:1Line detected, which is longer than the defined maximum line length in the code style.
154 disconnectFitbit()
155 } else {
156 //TODO: ORIGAMI - this Tool is now a part of ORIGAMI project and won't be used here
157 // com.sharecare.realgreen.origami.tool.sources.FitbitTool.toAuthorizePage(requireContext(), FITBIT_REDIRECT_SCHEME_TRACKER_WIZARD)
158 }
159 }
160
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/ui/AutomaticTrackingSwitchFragment.kt:166:1Line detected, which is longer than the defined maximum line length in the code style.
163 disconnectSamsungHealth()
164 } else {
165 //TODO: ORIGAMI - this Tool is now a part of ORIGAMI project and won't be used here
166 // com.sharecare.realgreen.origami.tool.sources.SamsungHealthTool.toAuthorizePage(requireContext(), SAMSUNG_REDIRECT_SCHEME_TRACKER_WIZARD)
167 }
168 }
169
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/ui/AutomaticTrackingSwitchFragment.kt:171:9Line detected, which is longer than the defined maximum line length in the code style.
168 }
169
170 private fun disconnectFitbit() {
171 DialogTool.showConfirmationDialog(requireContext(), String.format(getString(R.string.unsubscribe_title), getString(R.string.fitbit)),
172 String.format(getString(R.string.unsubscribe_message), getString(R.string.fitbit)),
173 getString(R.string.btn_ok),
174 getString(R.string.btn_cancel),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/ui/AutomaticTrackingSwitchFragment.kt:177:1Line detected, which is longer than the defined maximum line length in the code style.
174 getString(R.string.btn_cancel),
175 DialogInterface.OnClickListener { dialog, which ->
176 //TODO: ORIGAMI - this Tool is now a part of ORIGAMI project and won't be used here
177 // com.sharecare.realgreen.origami.tool.sources.FitbitTool.optOut(object : com.sharecare.realgreen.origami.tool.sources.RequestListener {
178 // override fun onSuccess() {
179 // TrackerPreferenceStore.getRepo().setFitbitConnected(false)
180 // updateSourcesStatus(TrackerUserSettingType.FIT_BIT)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/ui/AutomaticTrackingSwitchFragment.kt:193:9Line detected, which is longer than the defined maximum line length in the code style.
190 }
191
192 private fun disconnectSamsungHealth() {
193 DialogTool.showConfirmationDialog(requireContext(), String.format(getString(R.string.unsubscribe_title), getString(R.string.samsung_health)),
194 String.format(getString(R.string.unsubscribe_message), getString(R.string.samsung_health)),
195 getString(R.string.btn_ok),
196 getString(R.string.btn_cancel),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/ui/AutomaticTrackingSwitchFragment.kt:199:1Line detected, which is longer than the defined maximum line length in the code style.
196 getString(R.string.btn_cancel),
197 { dialog, which ->
198 //TODO: ORIGAMI - this Tool is now a part of ORIGAMI project and won't be used here
199 // com.sharecare.realgreen.origami.tool.sources.SamsungHealthTool.optOut(object : com.sharecare.realgreen.origami.tool.sources.RequestListener {
200 // override fun onSuccess() {
201 // TrackerPreferenceStore.getRepo().setSamsungHealthConnected(false)
202 // updateSourcesStatus(TrackerUserSettingType.SAMSUNG_HEALTH)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/ui/AutomaticTrackingSwitchFragment.kt:215:9Line detected, which is longer than the defined maximum line length in the code style.
212 }
213
214 private fun showTrackerSourceError(sourceType: Source.SourceType) {
215 TrackerSourceErrorActivity.startActivityForResult(requireActivity(), TRACKER_ERROR_ACTIVITY_RESULT_CODE, sourceType)
216 }
217
218 private fun updateSourcesStatus(trackerUserSettingType: TrackerUserSettingType) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/ui/AutomaticTrackingSwitchFragment.kt:268:1Line detected, which is longer than the defined maximum line length in the code style.
265 override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
266 super.onActivityResult(requestCode, resultCode, data)
267 //TODO: ORIGAMI - this Tool is now a part of ORIGAMI project and won't be used here
268 // if (com.sharecare.realgreen.origami.tool.sources.GoogleFitTool.GOOGLE_FIT_PERMISSIONS_REQUEST_CODE == requestCode) {
269 // if (resultCode == Activity.RESULT_OK) {
270 // TrackerSourceConfirmationActivity.start(requireActivity(), Source.SourceType.GOOGLE_FIT)
271 // com.sharecare.realgreen.origami.tool.sources.GoogleFitTool.setConnected()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/ui/AutomaticTrackingSwitchFragment.kt:280:1Line detected, which is longer than the defined maximum line length in the code style.
277 // } else if (TRACKER_ERROR_ACTIVITY_RESULT_CODE == requestCode && resultCode == Activity.RESULT_OK) run {
278 // if (data!!.getBooleanExtra(TrackerSourceErrorActivity.EXTRA_NEEDS_RETRY, false)) {
279 // when (data.getSerializableExtra(EXTRA_SOURCE_TYPE) as Source.SourceType) {
280 // Source.SourceType.FITBIT -> com.sharecare.realgreen.origami.tool.sources.FitbitTool.toAuthorizePage(requireContext(), FITBIT_REDIRECT_SCHEME_TRACKER_WIZARD)
281 // Source.SourceType.SAMSUNG -> com.sharecare.realgreen.origami.tool.sources.SamsungHealthTool.toAuthorizePage(requireContext(), SAMSUNG_REDIRECT_SCHEME_TRACKER_WIZARD)
282 // Source.SourceType.GOOGLE_FIT -> com.sharecare.realgreen.origami.tool.sources.GoogleFitTool.subscribeForGoogleFit(requireActivity())
283 // else -> {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/ui/AutomaticTrackingSwitchFragment.kt:281:1Line detected, which is longer than the defined maximum line length in the code style.
278 // if (data!!.getBooleanExtra(TrackerSourceErrorActivity.EXTRA_NEEDS_RETRY, false)) {
279 // when (data.getSerializableExtra(EXTRA_SOURCE_TYPE) as Source.SourceType) {
280 // Source.SourceType.FITBIT -> com.sharecare.realgreen.origami.tool.sources.FitbitTool.toAuthorizePage(requireContext(), FITBIT_REDIRECT_SCHEME_TRACKER_WIZARD)
281 // Source.SourceType.SAMSUNG -> com.sharecare.realgreen.origami.tool.sources.SamsungHealthTool.toAuthorizePage(requireContext(), SAMSUNG_REDIRECT_SCHEME_TRACKER_WIZARD)
282 // Source.SourceType.GOOGLE_FIT -> com.sharecare.realgreen.origami.tool.sources.GoogleFitTool.subscribeForGoogleFit(requireActivity())
283 // else -> {
284 // }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/ui/AutomaticTrackingSwitchFragment.kt:282:1Line detected, which is longer than the defined maximum line length in the code style.
279 // when (data.getSerializableExtra(EXTRA_SOURCE_TYPE) as Source.SourceType) {
280 // Source.SourceType.FITBIT -> com.sharecare.realgreen.origami.tool.sources.FitbitTool.toAuthorizePage(requireContext(), FITBIT_REDIRECT_SCHEME_TRACKER_WIZARD)
281 // Source.SourceType.SAMSUNG -> com.sharecare.realgreen.origami.tool.sources.SamsungHealthTool.toAuthorizePage(requireContext(), SAMSUNG_REDIRECT_SCHEME_TRACKER_WIZARD)
282 // Source.SourceType.GOOGLE_FIT -> com.sharecare.realgreen.origami.tool.sources.GoogleFitTool.subscribeForGoogleFit(requireActivity())
283 // else -> {
284 // }
285 // }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/info/ui/GdtInfoActivity.kt:70:13Line detected, which is longer than the defined maximum line length in the code style.
67
68 private fun setupLearnMoreLink() {
69 if (!isFirstTime) {
70 TrackerSupportLinkUtil.injectDevicesAndApplicationsSupportCustomerSupportPath(this, binding.containerTrackingInfo.description)
71 }
72 }
73
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/medication/details/presenter/MedicationDetailsPresenter.kt:68:9Line detected, which is longer than the defined maximum line length in the code style.
65 }
66
67 fun isTracked(rxCode: String): Boolean {
68 return configuration.medicationSettings != null && configuration.medicationSettings!!.any { it.rxCode.equals(rxCode) }
69 }
70
71 fun loadMedicationDetails(medicationData: CIMedicationDetailData) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/medication/details/presenter/MedicationDetailsPresenter.kt:76:21Line detected, which is longer than the defined maximum line length in the code style.
73
74 val dosage: Int? =
75 if (isTracked(medicationData.matchCode.code)) {
76 configuration.medicationSettings!!.find { it.rxCode.equals(medicationData.matchCode.code) }?.dosage?.toInt()
77 } else {
78 1
79 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/medication/details/presenter/MedicationDetailsPresenter.kt:126:13Line detected, which is longer than the defined maximum line length in the code style.
123 .toDouble()))
124 }
125 } else {
126 val index = configuration.medicationSettings!!.indexOfFirst { it.rxCode.equals(medicationData.matchCode.code) }
127 when (index) {
128 in 0..configuration.medicationSettings!!.size -> configuration.medicationSettings!!.removeAt(index)
129 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/medication/details/presenter/MedicationDetailsPresenter.kt:141:9Line detected, which is longer than the defined maximum line length in the code style.
138 medicationData.matchCode.codeSystemName,
139 medicationData.matchCode.codeSystem,
140 medicationData.matchCode.codeClass)
141 val meta = Meta(dataQuality = DATA_QUALITY, batchId = null, persistentRecordId = null, resourceKey = null, sendingSystem = null)
142 val source = Source(SOURCE_NAME, notes = null, type = SOURCE_TYPE, meta = meta)
143 val medicationToCreate: MedicationIn =
144 MedicationIn(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/medication/details/presenter/MedicationDetailsPresenter.kt:161:25Line detected, which is longer than the defined maximum line length in the code style.
158 source = source,
159 userId = null, strength = null, secureId = null,
160 refill = null, instructions = null,
161 careTeam = null, expirationDate = null, pharmacyNabpId = null, brandGenericFlag = null, ingredients = null)
162 return medicationToCreate
163 }
164
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/medication/main/presenter/MedicationListPresenter.kt:13:31Line detected, which is longer than the defined maximum line length in the code style.
10
11 class MedicationListPresenter(private val selectedDate: DateTime,
12 private val tracking: Boolean,
13 private val conditionalEntryRepository: GreenDayConfigurationRepository = GreenDayConfigurationDataRepository()
14 ) : BasePresenter<MedicationListMvpView>() {
15
16 fun donNotTrackMedication() {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/medication/main/presenter/MedicationTrackerPresenter.kt:53:17Line detected, which is longer than the defined maximum line length in the code style.
50 tryDisposeSubscription()
51
52 remoteSubscription =
53 healthProfileDataRepository.getHpMedications(FIRST_PAGE, MEDICATIONS_PER_PAGE, MEDICATIONS_SORT_FIELD).withDefaultSchedulers().zipWithCompletable(
54 healthProfileDataRepository.resetMedicationsCountRemotely(dependentId),
55 BiFunction<List<HPMedicationResult>, String, List<HPMedicationResult>> { hpMedications, _ ->
56 hpMedications
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/medication/main/presenter/MedicationTrackerPresenter.kt:75:5Line detected, which is longer than the defined maximum line length in the code style.
72 newCount = medicationsCount
73 })
74
75 private fun fetchMedicationsExtras(start: Int, codes: List<List<CIMedicationCode>>, hpRecords: List<HPMedicationResult>) {
76 tryDisposeSubscription()
77 remoteSubscription = getExtrasComposedList(codes, hpRecords)
78 .map {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/medication/main/presenter/MedicationTrackerPresenter.kt:177:9Line detected, which is longer than the defined maximum line length in the code style.
174 fun updateSingleUpdate(medicationTrackerItemUpdatedEvent: MedicationTrackerItemUpdatedEvent) {
175 mvpView.showLoader()
176 tryDisposeSubscription()
177 remoteSubscription = getExtrasComposedList(assembleRequestCodesFromMedication(medicationTrackerItemUpdatedEvent.updatedItem!!),
178 assembleHPMedicationResultFromMedication(medicationTrackerItemUpdatedEvent.updatedItem))
179 .map { medicationDetailsResults ->
180 if (medicationDetailsResults.isNotEmpty()) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/medication/main/presenter/MedicationTrackerPresenter.kt:182:29Line detected, which is longer than the defined maximum line length in the code style.
179 .map { medicationDetailsResults ->
180 if (medicationDetailsResults.isNotEmpty()) {
181 val searchedItemIndex = allMedications?.indexOfFirst {
182 (it.ciMedicationDetailData.matchCode.code.equals(medicationDetailsResults.get(0).ciMedicationDetailData.matchCode.code))
183 }
184 if (searchedItemIndex == null || searchedItemIndex == -1) {
185 allMedications!!.add(medicationDetailsResults.get(0))
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/medication/main/presenter/MedicationTrackerPresenter.kt:219:5Line detected, which is longer than the defined maximum line length in the code style.
216 }
217 }
218
219 private fun getExtrasComposedList(codes: List<List<CIMedicationCode>>, hpRecords: List<HPMedicationResult>) = healthProfileDataRepository.getCiMedicationsDetails(codes)
220 .map {
221 PHRMedicationUtil.inflateMedicationsSections(it, null, null, null, hpRecords)
222 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/medication/main/presenter/MedicationTrackerPresenter.kt:245:17Line detected, which is longer than the defined maximum line length in the code style.
242 status = medication.status!!,
243 codes = hpMedicationCodes,
244 note = medication.note,
245 source = HPMedicationSource(medication.source?.name!!, medication.source?.notes, medication.source?.type!!, null),
246 createDate = medication.createDate!!,
247 updateDate = medication.updateDate!!,
248 observationDate = medication.observationDate!!,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/medication/main/repository/MedicationDataRepository.kt:16:5Line detected, which is longer than the defined maximum line length in the code style.
13 return service.createMedication(medicationItem, dependentId)
14 }
15
16 override fun getMedicationsHistory(numberOfItemsPerPage: Int, numberOfPage: Int, dependentId: String?): Single<List<Medication>> {
17 return service.getMedicationsHistory(numberOfItemsPerPage, numberOfPage, dependentId)
18 }
19
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/medication/main/repository/MedicationRepository.kt:14:5Line detected, which is longer than the defined maximum line length in the code style.
11
12 fun getMedicationByCode(code: String, dependentId: String? = null): Single<List<Medication>>
13
14 fun getMedicationsHistory(numberOfItemsPerPage: Int, numberOfPage: Int, dependentId: String? = null): Single<List<Medication>>
15
16 fun getMedicationsHistory(numberOfPage: Int, dependentId: String? = null): Single<List<Medication>> = getMedicationsHistory(20, numberOfPage, dependentId)
17
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/medication/main/repository/MedicationRepository.kt:16:5Line detected, which is longer than the defined maximum line length in the code style.
13
14 fun getMedicationsHistory(numberOfItemsPerPage: Int, numberOfPage: Int, dependentId: String? = null): Single<List<Medication>>
15
16 fun getMedicationsHistory(numberOfPage: Int, dependentId: String? = null): Single<List<Medication>> = getMedicationsHistory(20, numberOfPage, dependentId)
17
18 fun createMedication(medicationItem: List<Medication>, dependentId: String? = null): Single<List<Medication>>
19
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/medication/main/ui/MedicationFragmentAdapter.kt:10:1Line detected, which is longer than the defined maximum line length in the code style.
7 import com.sharecare.realgreen.tracker.presentation.medication.main.ui.MedicationListFragment.Companion.newInstance
8 import org.joda.time.DateTime
9
10 class MedicationFragmentAdapter(fm: FragmentManager, lifecycle: Lifecycle, val selectedDate: DateTime) : FragmentStateAdapter(fm,lifecycle) {
11 private val PAGE_COUNT = 2
12 private val fragments = arrayOfNulls<MedicationListFragment>(PAGE_COUNT)
13 override fun getItemCount() = PAGE_COUNT
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/medication/main/ui/MedicationListFragment.kt:29:1Line detected, which is longer than the defined maximum line length in the code style.
26 import io.reactivex.disposables.Disposable
27 import org.joda.time.DateTime
28
29 class MedicationListFragment : BaseFragment<MedicationListPresenter, MedicationListMvpView>(), MedicationListMvpView, MedicalItemClickListener {
30
31 private lateinit var binding: FragmentMedicationsListBinding
32 private lateinit var medicationTrackerSubscription: Disposable
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/medication/main/ui/MedicationListFragment.kt:47:9Line detected, which is longer than the defined maximum line length in the code style.
44
45 override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
46 savedInstanceState: Bundle?): View? {
47 binding = DataBindingUtil.inflate<FragmentMedicationsListBinding>(inflater, R.layout.fragment_medications_list, null, false)
48 presenter!!.attachView(this)
49 initRecyclerView()
50 return binding.root
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/medication/main/ui/MedicationListFragment.kt:75:9Line detected, which is longer than the defined maximum line length in the code style.
72 }
73
74 override fun showEmptyScreen() {
75 (activity as BaseActivity<*, *>).showCustomErrorView(R.layout.medication_tracked_empty_view, View.OnClickListener {
76 presenter?.donNotTrackMedication()
77 })
78 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/medication/main/ui/MedicationTrackerMvpView.kt:11:5Line detected, which is longer than the defined maximum line length in the code style.
8 fun showLoader()
9 fun hideLoader()
10 fun showError()
11 fun notifyMedicationLists(allMedications: List<HPMedicationSection>?, trackedMedications: List<HPMedicationSection>?)
12 fun navigateToMedicationTutorial()
13 }
14
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/medication/search/presenter/MedicationSearchPresenter.kt:24:5Line detected, which is longer than the defined maximum line length in the code style.
21 private var searchRepositorySubscription: Disposable? = null
22 private var medicationsSuggestion: MutableList<MedicationSearchSuggestionItem> = ArrayList()
23
24 fun fetchUserSuggestion(listOfCodes: ArrayList<ArrayList<CIMedicationCode>>?, hpRecords: List<HPMedicationResult>?) {
25 if ((listOfCodes != null) && (hpRecords != null)) {
26 medicationRepositorySubscription = addDisposable(getExtrasComposedList(listOfCodes, hpRecords)
27 .observeOn(observeScheduler)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/medication/search/presenter/MedicationSearchPresenter.kt:45:9Line detected, which is longer than the defined maximum line length in the code style.
42
43 fun fetchMedicationData(medicationItem: MedicationSearchSuggestionItem) {
44 val codes = assembleRequestCodes(medicationItem.medicationData?.ciMedicationDetailData)
45 medicationRepositorySubscription = addDisposable(healthProfileDataRepository.getHpMedications(MedicationTrackerPresenter.FIRST_PAGE,
46 MedicationTrackerPresenter.MEDICATIONS_PER_PAGE,
47 MedicationTrackerPresenter.MEDICATIONS_SORT_FIELD)
48 .withDefaultSchedulers()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/medication/search/presenter/MedicationSearchPresenter.kt:57:40Line detected, which is longer than the defined maximum line length in the code style.
54 }
55
56 private fun fetchMedicationsExtras(start: Int, codes: List<List<CIMedicationCode>>,
57 hpRecords: List<HPMedicationResult>, medicationItem: MedicationSearchSuggestionItem) {
58 medicationRepositorySubscription = addDisposable(getExtrasComposedList(codes, hpRecords)
59 .withDefaultSchedulers()
60 .subscribe({
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/medication/search/presenter/MedicationSearchPresenter.kt:63:25Line detected, which is longer than the defined maximum line length in the code style.
60 .subscribe({
61 if (!it.isEmpty()) {
62 medicationItem.medicationData = it[0]
63 mvpView.navigateToMedicationDetails(isMedicationInCabinet(medicationItem.id), medicationItem.medicationData)
64 }
65 }) {
66 mvpView.showError()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/medication/search/presenter/MedicationSearchPresenter.kt:82:5Line detected, which is longer than the defined maximum line length in the code style.
79 this.add(plainCodes)
80 }
81
82 private fun getExtrasComposedList(codes: List<List<CIMedicationCode>>, hpRecords: List<HPMedicationResult>) = healthProfileDataRepository.getCiMedicationsDetails(codes)
83 .map {
84 PHRMedicationUtil.inflateMedicationsSections(it, null, null, null, hpRecords)
85 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/medication/search/presenter/MedicationSearchPresenter.kt:92:13Line detected, which is longer than the defined maximum line length in the code style.
89 medicationsSuggestion.isNotEmpty().let { mvpView.showSuggestions(medicationsSuggestion) }
90 } else {
91 removeDisposable(searchRepositorySubscription)
92 searchRepositorySubscription = addDisposable(healthProfileDataRepository.getCiMedicationsSuggestions(searchTerm,
93 FIRST_PAGE, MEDICATIONS_PER_PAGE)
94 .subscribeOn(subscribeScheduler)
95 .map { result ->
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/medication/search/repository/HealthProfileRepository.kt:14:5Line detected, which is longer than the defined maximum line length in the code style.
11
12
13 interface HealthProfileRepository {
14 fun getHpMedications(start: Int, limit: Int, sortOrder: String, dependentId: String? = null): Single<List<HPMedicationResult>>
15 fun resetMedicationsCountRemotely(dependentId: String? = null): Completable
16 fun getCiMedicationsDetails(codes: List<List<CIMedicationCode>>, dependentId: String? = null): Single<List<CIMedicationDetailResult>>
17 fun getCiMedicationsImages(minWidth: Int, codes: List<List<CIMedicationCode>>, dependentId: String? = null): Single<List<CIMedicationImageResult>>
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/medication/search/repository/HealthProfileRepository.kt:16:5Line detected, which is longer than the defined maximum line length in the code style.
13 interface HealthProfileRepository {
14 fun getHpMedications(start: Int, limit: Int, sortOrder: String, dependentId: String? = null): Single<List<HPMedicationResult>>
15 fun resetMedicationsCountRemotely(dependentId: String? = null): Completable
16 fun getCiMedicationsDetails(codes: List<List<CIMedicationCode>>, dependentId: String? = null): Single<List<CIMedicationDetailResult>>
17 fun getCiMedicationsImages(minWidth: Int, codes: List<List<CIMedicationCode>>, dependentId: String? = null): Single<List<CIMedicationImageResult>>
18 fun getCiMedicationsSuggestions(input: String, start: Int, limit: Int, dependentId: String? = null): Single<List<CIMedicationDetailData>>
19 fun getCiMedicationsInfosheets(codes: List<List<CIMedicationCode>>, dependentId: String? = null): Single<List<CIMedicationInfosheetResult>>
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/medication/search/repository/HealthProfileRepository.kt:17:5Line detected, which is longer than the defined maximum line length in the code style.
14 fun getHpMedications(start: Int, limit: Int, sortOrder: String, dependentId: String? = null): Single<List<HPMedicationResult>>
15 fun resetMedicationsCountRemotely(dependentId: String? = null): Completable
16 fun getCiMedicationsDetails(codes: List<List<CIMedicationCode>>, dependentId: String? = null): Single<List<CIMedicationDetailResult>>
17 fun getCiMedicationsImages(minWidth: Int, codes: List<List<CIMedicationCode>>, dependentId: String? = null): Single<List<CIMedicationImageResult>>
18 fun getCiMedicationsSuggestions(input: String, start: Int, limit: Int, dependentId: String? = null): Single<List<CIMedicationDetailData>>
19 fun getCiMedicationsInfosheets(codes: List<List<CIMedicationCode>>, dependentId: String? = null): Single<List<CIMedicationInfosheetResult>>
20 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/medication/search/repository/HealthProfileRepository.kt:18:5Line detected, which is longer than the defined maximum line length in the code style.
15 fun resetMedicationsCountRemotely(dependentId: String? = null): Completable
16 fun getCiMedicationsDetails(codes: List<List<CIMedicationCode>>, dependentId: String? = null): Single<List<CIMedicationDetailResult>>
17 fun getCiMedicationsImages(minWidth: Int, codes: List<List<CIMedicationCode>>, dependentId: String? = null): Single<List<CIMedicationImageResult>>
18 fun getCiMedicationsSuggestions(input: String, start: Int, limit: Int, dependentId: String? = null): Single<List<CIMedicationDetailData>>
19 fun getCiMedicationsInfosheets(codes: List<List<CIMedicationCode>>, dependentId: String? = null): Single<List<CIMedicationInfosheetResult>>
20 }
21
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/medication/search/repository/HealthProfileRepository.kt:19:5Line detected, which is longer than the defined maximum line length in the code style.
16 fun getCiMedicationsDetails(codes: List<List<CIMedicationCode>>, dependentId: String? = null): Single<List<CIMedicationDetailResult>>
17 fun getCiMedicationsImages(minWidth: Int, codes: List<List<CIMedicationCode>>, dependentId: String? = null): Single<List<CIMedicationImageResult>>
18 fun getCiMedicationsSuggestions(input: String, start: Int, limit: Int, dependentId: String? = null): Single<List<CIMedicationDetailData>>
19 fun getCiMedicationsInfosheets(codes: List<List<CIMedicationCode>>, dependentId: String? = null): Single<List<CIMedicationInfosheetResult>>
20 }
21
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/medication/search/ui/MedicationSearchActivity.kt:99:9Line detected, which is longer than the defined maximum line length in the code style.
96
97 override fun showSuggestions(medications: MutableList<MedicationSearchSuggestionItem>) {
98 showRecycleViewList()
99 binding.recyclerView.adapter = MedicalSearchSuggestionAdapter(getString(R.string.phr_medications), object : MedicalItemClickListener {
100 override fun onItemClicked(medicationItem: MedicationSearchSuggestionItem) {
101 navigateToMedicationDetails(true, medicationItem.medicationData)
102 logSearchToAnalytics(GeneralSearchAnalytics.SearchType.PREDICTIVE, medicationItem.medicationName)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/medication/search/ui/MedicationSearchActivity.kt:109:9Line detected, which is longer than the defined maximum line length in the code style.
106
107 override fun showSearchResults(searchResults: MutableList<MedicationSearchSuggestionItem>) {
108 showRecycleViewList()
109 binding.recyclerView.adapter = MedicalSearchSuggestionAdapter(getString(R.string.search_suggestion), object : MedicalItemClickListener {
110 override fun onItemClicked(medicationItem: MedicationSearchSuggestionItem) {
111 presenter?.fetchMedicationData(medicationItem)
112 logSearchToAnalytics(GeneralSearchAnalytics.SearchType.PREDICTIVE, medicationItem.medicationName)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/medication/search/ui/MedicationSearchActivity.kt:184:9Line detected, which is longer than the defined maximum line length in the code style.
181 }
182
183 private fun logSearchToAnalytics(searchType: GeneralSearchAnalytics.SearchType, searchKeyword: String) {
184 GeneralSearchAnalytics.reportSearchAction(GeneralAnalytics.Action.FAD, searchType, searchKeyword, GeneralSearchAnalytics.SearchContent.MEDICATION)
185 }
186
187 companion object {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/settings/interactor/DataSourcePermissionsInteractor.kt:41:13Line detected, which is longer than the defined maximum line length in the code style.
38
39 private fun hasGrantedPermission(context: Context, trackerType: TrackerType): Boolean {
40 return when (trackerType) {
41 TrackerType.SLEEP -> PermissionsUtil.arePermissionsGranted(context, PermissionsUtil.PermissionValue.LOCATION)
42 || PermissionsUtil.arePermissionsGranted(context, PermissionsUtil.PermissionValue.MICROPHONE)
43 TrackerType.STEPS -> PermissionsUtil.arePermissionsGranted(context, PermissionsUtil.PermissionValue.LOCATION)
44 else -> false
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/settings/interactor/DataSourcePermissionsInteractor.kt:43:13Line detected, which is longer than the defined maximum line length in the code style.
40 return when (trackerType) {
41 TrackerType.SLEEP -> PermissionsUtil.arePermissionsGranted(context, PermissionsUtil.PermissionValue.LOCATION)
42 || PermissionsUtil.arePermissionsGranted(context, PermissionsUtil.PermissionValue.MICROPHONE)
43 TrackerType.STEPS -> PermissionsUtil.arePermissionsGranted(context, PermissionsUtil.PermissionValue.LOCATION)
44 else -> false
45 }
46 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/settings/interactor/DataSourcePermissionsInteractor.kt:52:1Line detected, which is longer than the defined maximum line length in the code style.
49 return when (trackerUserSettingType) {
50 //TODO: ORIGAMI - this Tool is now a part of ORIGAMI project and won't be used here
51 // TrackerUserSettingType.GOOGLE_FIT ->
52 // !TrackerPreferenceStore.getRepo().isFitBitConnected() && !TrackerPreferenceStore.getRepo().isSamsungHealthConnected()
53 // TrackerUserSettingType.FIT_BIT ->
54 // !com.sharecare.realgreen.origami.tool.sources.GoogleFitTool.isUserSubscribed(context) && !TrackerPreferenceStore.getRepo().isSamsungHealthConnected()
55 // TrackerUserSettingType.SAMSUNG_HEALTH ->
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/settings/interactor/DataSourcePermissionsInteractor.kt:54:1Line detected, which is longer than the defined maximum line length in the code style.
51 // TrackerUserSettingType.GOOGLE_FIT ->
52 // !TrackerPreferenceStore.getRepo().isFitBitConnected() && !TrackerPreferenceStore.getRepo().isSamsungHealthConnected()
53 // TrackerUserSettingType.FIT_BIT ->
54 // !com.sharecare.realgreen.origami.tool.sources.GoogleFitTool.isUserSubscribed(context) && !TrackerPreferenceStore.getRepo().isSamsungHealthConnected()
55 // TrackerUserSettingType.SAMSUNG_HEALTH ->
56 // !com.sharecare.realgreen.origami.tool.sources.GoogleFitTool.isUserSubscribed(context) && !TrackerPreferenceStore.getRepo().isFitBitConnected()
57 else -> false
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/settings/interactor/DataSourcePermissionsInteractor.kt:56:1Line detected, which is longer than the defined maximum line length in the code style.
53 // TrackerUserSettingType.FIT_BIT ->
54 // !com.sharecare.realgreen.origami.tool.sources.GoogleFitTool.isUserSubscribed(context) && !TrackerPreferenceStore.getRepo().isSamsungHealthConnected()
55 // TrackerUserSettingType.SAMSUNG_HEALTH ->
56 // !com.sharecare.realgreen.origami.tool.sources.GoogleFitTool.isUserSubscribed(context) && !TrackerPreferenceStore.getRepo().isFitBitConnected()
57 else -> false
58 }
59 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/settings/presenter/TrackerSettingsGeneralExtendedPresenter.kt:21:1Line detected, which is longer than the defined maximum line length in the code style.
18 import com.sharecare.realgreen.tracker.repository.TrackerUserSettingsRepository
19
20 open class TrackerSettingsGeneralExtendedPresenter<T : AutomaticTrackingSwitchMvpView>
21 (trackerUserSettingsRepository: TrackerUserSettingsRepository) : TrackerSettingsGeneralPresenter<T>(trackerUserSettingsRepository) {
22 private var shouldCheckSwitchSteps = false
23 private var shouldCheckSwitchSleep = false
24
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/settings/presenter/TrackerSettingsGeneralExtendedPresenter.kt:51:5Line detected, which is longer than the defined maximum line length in the code style.
48 }
49 }
50
51 fun passDeeplink(activity: Activity, deepLinkUrl: String, successAction: () -> Unit, failAction: (Source.SourceType) -> Unit) {
52 DeepLinkStore.setDeferredDeepLink(deepLinkUrl)
53
54 val parsedUri = Uri.parse(deepLinkUrl)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/settings/presenter/TrackerSettingsGeneralExtendedPresenter.kt:124:5Line detected, which is longer than the defined maximum line length in the code style.
121 mvpView?.showDataSourceDialog(title, message, arrayAdapter, onItemClickListener)
122 }
123
124 private fun optInFitBitTrackerSource(token: String, activity: Activity, successAction: () -> Unit, failAction: (Source.SourceType) -> Unit) {
125 //TODO: ORIGAMI - this Tool is now a part of ORIGAMI project and won't be used here
126 // com.sharecare.realgreen.origami.tool.sources.FitbitTool.optInIfValid(token, com.sharecare.realgreen.origami.tool.sources.FitbitTool.FITBIT_REDIRECT_SCHEME_TRACKER_SETTINGS, object : com.sharecare.realgreen.origami.tool.sources.RequestListener {
127 // override fun onSuccess() {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/settings/presenter/TrackerSettingsGeneralExtendedPresenter.kt:126:5Line detected, which is longer than the defined maximum line length in the code style.
123
124 private fun optInFitBitTrackerSource(token: String, activity: Activity, successAction: () -> Unit, failAction: (Source.SourceType) -> Unit) {
125 //TODO: ORIGAMI - this Tool is now a part of ORIGAMI project and won't be used here
126 // com.sharecare.realgreen.origami.tool.sources.FitbitTool.optInIfValid(token, com.sharecare.realgreen.origami.tool.sources.FitbitTool.FITBIT_REDIRECT_SCHEME_TRACKER_SETTINGS, object : com.sharecare.realgreen.origami.tool.sources.RequestListener {
127 // override fun onSuccess() {
128 // TrackerSourceConfirmationActivity.start(activity, Source.SourceType.FITBIT)
129 // TrackerPreferenceStore.getRepo().setFitbitConnected(true)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/settings/presenter/TrackerSettingsGeneralExtendedPresenter.kt:142:5Line detected, which is longer than the defined maximum line length in the code style.
139 // })
140 }
141
142 private fun optInSamsungHealthTrackerSource(token: String, activity: Activity, successAction: () -> Unit, failAction: (Source.SourceType) -> Unit) {
143 //TODO: ORIGAMI - this Tool is now a part of ORIGAMI project and won't be used here
144 // com.sharecare.realgreen.origami.tool.sources.SamsungHealthTool.optIn(token, com.sharecare.realgreen.origami.tool.sources.SamsungHealthTool.SAMSUNG_REDIRECT_SCHEME_TRACKER_SETTINGS, object : com.sharecare.realgreen.origami.tool.sources.RequestListener {
145 // override fun onSuccess() {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/settings/presenter/TrackerSettingsGeneralExtendedPresenter.kt:144:5Line detected, which is longer than the defined maximum line length in the code style.
141
142 private fun optInSamsungHealthTrackerSource(token: String, activity: Activity, successAction: () -> Unit, failAction: (Source.SourceType) -> Unit) {
143 //TODO: ORIGAMI - this Tool is now a part of ORIGAMI project and won't be used here
144 // com.sharecare.realgreen.origami.tool.sources.SamsungHealthTool.optIn(token, com.sharecare.realgreen.origami.tool.sources.SamsungHealthTool.SAMSUNG_REDIRECT_SCHEME_TRACKER_SETTINGS, object : com.sharecare.realgreen.origami.tool.sources.RequestListener {
145 // override fun onSuccess() {
146 // TrackerSourceConfirmationActivity.start(activity, Source.SourceType.SAMSUNG)
147 // TrackerPreferenceStore.getRepo().setSamsungHealthConnected(true)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/settings/presenter/TrackerSettingsGeneralExtendedPresenter.kt:161:9Line detected, which is longer than the defined maximum line length in the code style.
158 }
159
160 companion object {
161 private const val CODE_PARAMETER_NAME = "code" //TODO: ORIGAMI – replace it with OrigamiSettingsLinkParser.CODE_PARAMETER_NAME once tracker module will be merged with ORIGAMI
162 }
163 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/settings/presenter/TrackerSettingsGeneralPresenter.kt:54:13Line detected, which is longer than the defined maximum line length in the code style.
51
52 protected fun onSleepCheckChangedTo(checked: Boolean) {
53 if (TrackerPreferenceStore.getRepo().isSleepAutoTracked() != checked) {
54 updateTrackerUserSettings(TrackerUserSettingType.SLEEP, checked, object : TrackerSettingsPresenter.OnTrackerSettingsListener {
55 override fun onSuccess() {
56 updateSleepSetting(checked)
57 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/settings/presenter/TrackerSettingsGeneralPresenter.kt:68:13Line detected, which is longer than the defined maximum line length in the code style.
65
66 protected fun onStepsCheckChangedTo(checked: Boolean) {
67 if (TrackerPreferenceStore.getRepo().isStepsAutoTracked() != checked) {
68 updateTrackerUserSettings(TrackerUserSettingType.STEPS, checked, object : TrackerSettingsPresenter.OnTrackerSettingsListener {
69 override fun onSuccess() {
70 updateStepsSetting(checked)
71 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/settings/presenter/TrackerSettingsGeneralPresenter.kt:82:9Line detected, which is longer than the defined maximum line length in the code style.
79
80 private fun updateSleepSetting(checked: Boolean) {
81 trackerUserSettingsRepository.setSleep(checked)
82 reportSettingChange(if (checked) SettingType.SLEEP.checkInAnalyticsKey else SettingType.SLEEP.checkOutAnalyticsKey,
83 GeneralAnalytics.SLEEP,
84 if (checked) GeneralAnalytics.State.OPT_IN else GeneralAnalytics.State.OPT_OUT)
85 mvpView?.onSleepChanged(checked)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/settings/presenter/TrackerSettingsGeneralPresenter.kt:90:9Line detected, which is longer than the defined maximum line length in the code style.
87
88 private fun updateStepsSetting(checked: Boolean) {
89 trackerUserSettingsRepository.setSteps(checked)
90 reportSettingChange(if (checked) SettingType.STEPS.checkInAnalyticsKey else SettingType.STEPS.checkOutAnalyticsKey,
91 GeneralAnalytics.STEP,
92 if (checked) GeneralAnalytics.State.OPT_IN else GeneralAnalytics.State.OPT_OUT)
93 mvpView?.onStepsChanged(checked)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/settings/ui/TrackerSettingsDataSourceDetailActivity.kt:46:9Line detected, which is longer than the defined maximum line length in the code style.
43 trackerUserSettingType = intent.extras?.get(EXTRA_TRACKER_USER_SETTING_TYPE)!! as TrackerUserSettingType
44 setupToolbar(trackerUserSettingType)
45
46 binding.description.text = String.format("%s ", getString(R.string.tracker_settings_data_source_description_learn_more, getDataSourceName(trackerUserSettingType)))
47 binding.supportPage.paintFlags = binding.supportPage.paintFlags or Paint.UNDERLINE_TEXT_FLAG
48 binding.supportPage.setOnClickListener {
49 onSupportClicked()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/settings/ui/TrackerSettingsDataSourceDetailActivity.kt:88:9Line detected, which is longer than the defined maximum line length in the code style.
85 }
86
87 private fun disconnectGoogleFit() {
88 val disableTrackers = presenter!!.isOnlyConnectedDataSourceWithNoPermissionGranted(this, TrackerUserSettingType.GOOGLE_FIT)
89 DialogTool.showConfirmationDialog(this, String.format(getString(R.string.unsubscribe_title), getString(R.string.google_fit)),
90 String.format(getDisconnectMessage(disableTrackers), getString(R.string.google_fit)),
91 getString(R.string.btn_ok),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/settings/ui/TrackerSettingsDataSourceDetailActivity.kt:89:9Line detected, which is longer than the defined maximum line length in the code style.
86
87 private fun disconnectGoogleFit() {
88 val disableTrackers = presenter!!.isOnlyConnectedDataSourceWithNoPermissionGranted(this, TrackerUserSettingType.GOOGLE_FIT)
89 DialogTool.showConfirmationDialog(this, String.format(getString(R.string.unsubscribe_title), getString(R.string.google_fit)),
90 String.format(getDisconnectMessage(disableTrackers), getString(R.string.google_fit)),
91 getString(R.string.btn_ok),
92 getString(R.string.btn_cancel)) { dialog, which ->
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/settings/ui/TrackerSettingsDataSourceDetailActivity.kt:96:1Line detected, which is longer than the defined maximum line length in the code style.
93 if (isNetworkAvailable()) {
94 //TODO: ORIGAMI - this Tool is now a part of ORIGAMI project and won't be used here
95
96 // com.sharecare.realgreen.origami.tool.sources.GoogleFitTool.unsubscribeFromGoogleFit(this@TrackerSettingsDataSourceDetailActivity, object : com.sharecare.realgreen.origami.tool.sources.GoogleFitTool.RequestListener<Void> {
97 // override fun onSuccess(result: Void) {
98 // }
99 //
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/settings/ui/TrackerSettingsDataSourceDetailActivity.kt:117:9Line detected, which is longer than the defined maximum line length in the code style.
114 }
115
116 private fun disconnectFitbit() {
117 val disableTrackers = presenter!!.isOnlyConnectedDataSourceWithNoPermissionGranted(this, TrackerUserSettingType.FIT_BIT)
118 DialogTool.showConfirmationDialog(this, String.format(getString(R.string.unsubscribe_title), getString(R.string.fitbit)),
119 String.format(getDisconnectMessage(disableTrackers), getString(R.string.fitbit)),
120 getString(R.string.btn_ok),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/settings/ui/TrackerSettingsDataSourceDetailActivity.kt:118:9Line detected, which is longer than the defined maximum line length in the code style.
115
116 private fun disconnectFitbit() {
117 val disableTrackers = presenter!!.isOnlyConnectedDataSourceWithNoPermissionGranted(this, TrackerUserSettingType.FIT_BIT)
118 DialogTool.showConfirmationDialog(this, String.format(getString(R.string.unsubscribe_title), getString(R.string.fitbit)),
119 String.format(getDisconnectMessage(disableTrackers), getString(R.string.fitbit)),
120 getString(R.string.btn_ok),
121 getString(R.string.btn_cancel)) { dialog, which ->
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/settings/ui/TrackerSettingsDataSourceDetailActivity.kt:123:1Line detected, which is longer than the defined maximum line length in the code style.
120 getString(R.string.btn_ok),
121 getString(R.string.btn_cancel)) { dialog, which ->
122 //TODO: ORIGAMI - this Tool is now a part of ORIGAMI project and won't be used here
123 // com.sharecare.realgreen.origami.tool.sources.FitbitTool.optOut(object : com.sharecare.realgreen.origami.tool.sources.RequestListener {
124 // override fun onSuccess() {
125 // TrackerPreferenceStore.getRepo().setFitbitConnected(false)
126 // presenter!!.onFitbitChangedTo(false)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/settings/ui/TrackerSettingsDataSourceDetailActivity.kt:139:9Line detected, which is longer than the defined maximum line length in the code style.
136 }
137
138 private fun disconnectSamsungHealth() {
139 val disableTrackers = presenter!!.isOnlyConnectedDataSourceWithNoPermissionGranted(this, TrackerUserSettingType.SAMSUNG_HEALTH)
140 DialogTool.showConfirmationDialog(this, String.format(getString(R.string.unsubscribe_title), getString(R.string.samsung_health)),
141 String.format(getDisconnectMessage(disableTrackers), getString(R.string.samsung_health)),
142 getString(R.string.btn_ok),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/settings/ui/TrackerSettingsDataSourceDetailActivity.kt:140:9Line detected, which is longer than the defined maximum line length in the code style.
137
138 private fun disconnectSamsungHealth() {
139 val disableTrackers = presenter!!.isOnlyConnectedDataSourceWithNoPermissionGranted(this, TrackerUserSettingType.SAMSUNG_HEALTH)
140 DialogTool.showConfirmationDialog(this, String.format(getString(R.string.unsubscribe_title), getString(R.string.samsung_health)),
141 String.format(getDisconnectMessage(disableTrackers), getString(R.string.samsung_health)),
142 getString(R.string.btn_ok),
143 getString(R.string.btn_cancel)) { dialog, which ->
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/settings/ui/TrackerSettingsDataSourceDetailActivity.kt:145:1Line detected, which is longer than the defined maximum line length in the code style.
142 getString(R.string.btn_ok),
143 getString(R.string.btn_cancel)) { dialog, which ->
144 //TODO: ORIGAMI - this Tool is now a part of ORIGAMI project and won't be used here
145 // com.sharecare.realgreen.origami.tool.sources.SamsungHealthTool.optOut(object : com.sharecare.realgreen.origami.tool.sources.RequestListener {
146 // override fun onSuccess() {
147 // TrackerPreferenceStore.getRepo().setSamsungHealthConnected(false)
148 // presenter!!.onSamsungHealthChangedTo(false)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/settings/ui/TrackerSourceConfirmationActivity.kt:24:9Line detected, which is longer than the defined maximum line length in the code style.
21 binding.content.icon.setImageDrawable(getDrawable(R.drawable.ic_tofu_thumbs_up))
22 binding.content.title.text = getString(R.string.tracker_source_confirmation_title, sourceTypeName)
23
24 binding.content.description.text = String.format("%s %s", getString(R.string.tracker_source_confirmation_subtitle, sourceTypeName),
25 getString(R.string.tracker_source_confirmation_message, sourceTypeName, sourceTypeName))
26
27 initActionButton()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerlist/interactor/GreenDayListInteractor.kt:135:25Line detected, which is longer than the defined maximum line length in the code style.
132
133 if (TrackerType.SLEEP != gdtTracker.type && gdtTracker.isAutomatic(selectedDate)
134 && (gdtTracker.hasNoTrackers() ||
135 (gdtTracker.hasAnyTrackerOfSourceType(Source.SourceType.USER) && !gdtTracker.type!!.isMultipleEntries)
136 )
137 ) {
138 return TrackerButtonActionType.ADD_AUTOMATIC_TRACKER
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerlist/interactor/GreenDayListInteractor.kt:226:1Line detected, which is longer than the defined maximum line length in the code style.
223 LOG_ENTRIES_TRACKER_MS // new log entries (used by tracker microservice)
224 }
225
226 // These are the view types of the tracker entries that are shown in the list of the the tracker page (GreenDayListFragment)
227 enum class TrackerViewType {
228 RISK_STRATIFIED,
229 DUE,
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerlist/presenter/GreenDayListPresenter.kt:49:56Line detected, which is longer than the defined maximum line length in the code style.
46 trackerRepository: GreenDayTrackerRepository,
47 val trackerMsRepository: GreenDayTrackerMsRepository,
48 configurationRepository: GreenDayConfigurationRepository,
49 private val helpDismissedSettingsRepository: HelpDismissedSettingsRepository = HelpDismissedSettingsDataRepository(),
50 configuration: GDTConfiguration)
51 : GreenDayTrackersBasePresenter<MVP>(greenDayRepository, configurationRepository, trackerRepository, configuration),
52 Serializable {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerlist/presenter/GreenDayListPresenter.kt:87:25Line detected, which is longer than the defined maximum line length in the code style.
84 .doFinally {
85 val greenDayTracker = greenDay?.findGreenDayTrackerByType(trackerType)
86 if (greenDayTracker != null && deepLinkScreen != null && deepLinkScreen.modeEnter) {
87 this@GreenDayListPresenter.requestConfigurationAndRequestNextScreen(greenDayTracker, isNetworkAvailable)
88 } else if (greenDayTracker != null) {
89 this@GreenDayListPresenter.handleTrackerActionButtonClick(greenDayTracker)
90 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerlist/presenter/GreenDayListPresenter.kt:165:9Line detected, which is longer than the defined maximum line length in the code style.
162 trackerClicked = true
163
164 removeDisposable(configSubscription)
165 configSubscription = addDisposable(configurationRepository.getConfigurationRemotely(TrackerUtil.dateFormatted(selectedDate))
166 .withDefaultSchedulers()
167 .doOnSuccess { configurationResponse ->
168 if (configurationResponse != null) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerlist/presenter/GreenDayListPresenter.kt:177:25Line detected, which is longer than the defined maximum line length in the code style.
174 if (configurationResponse != null && configurationResponse.configuration != null &&
175 configurationResponse.configuration.startDate != null &&
176 !configurationResponse.configuration.startDate.isEmpty()) {
177 userSubscribedToGreenDayProgramDate = DateUtil.parseDateTimeDefault(configurationResponse.configuration.startDate)
178 }
179 this@GreenDayListPresenter.requestNextScreen(gdtTracker!!, isNetworkAvailable)
180 }, { this@GreenDayListPresenter.requestNextScreen(gdtTracker!!, isNetworkAvailable) }))
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerlist/presenter/GreenDayListPresenter.kt:196:25Line detected, which is longer than the defined maximum line length in the code style.
193 && !trackerType.isMultipleEntries) {
194 mvpView?.updateScreen()
195 if (greenDayTracker.trackers!![0].id != null
196 && trackerType != TrackerType.SLEEP) { // we don't delete sleep trackers when we change from automatic to manual and vice versa
197 deleteTracker(greenDayTracker.trackers!![0].id, trackerType)
198 }
199 } else if (i == size - 1) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerlist/presenter/GreenDayListPresenter.kt:463:21Line detected, which is longer than the defined maximum line length in the code style.
460 .doOnSuccess { gdtResponse -> greenDayRepository.saveGreenDayLocally(gdtResponse) }
461 .subscribe({
462 mvpView?.updateScreen()
463 this@GreenDayListPresenter.initTrackers(greenDayRepository.getGreenDayLocally(TrackerUtil.dateFormatted(selectedDate)))
464 }, {
465 if (trackerRequest.trackerData != null) {
466 val record = trackerRepository.generateRealmRecord(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerlist/presenter/GreenDayListPresenter.kt:541:9Line detected, which is longer than the defined maximum line length in the code style.
538 }
539
540 fun isConfigurationNotSetForType(trackerType: TrackerType): Boolean {
541 val configuration = configurationRepository.getConfigurationRecordLocally(TrackerUtil.dateFormatted(selectedDate))
542 return TrackerUtil.gdtConfigurationNotSet(configuration, trackerType)
543 }
544
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerlist/presenter/GreenDayListPresenter.kt:546:9Line detected, which is longer than the defined maximum line length in the code style.
543 }
544
545 fun shouldHideAutomaticTrackingInfoTip(): Boolean {
546 return helpDismissedSettingsRepository.isAutomaticTrackingInfoTipDismissed() || !TrackerPreferenceStore.getRepo().isStepsAutoTracked()
547 }
548
549 fun handleLearnMoreButtonClicked() {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerlist/ui/GreenDayEntryAdapter.kt:12:28Line detected, which is longer than the defined maximum line length in the code style.
9 class GreenDayEntryAdapter(private val context: Context,
10 private val entries: MutableList<TrackerEntry> = mutableListOf(),
11 private var isGreenDayUpdatable: Boolean? = false,
12 private var selectedDate: DateTime? = DateTime.now()) : RecyclerView.Adapter<RecyclerView.ViewHolder>() {
13
14 var listener: OnItemListener? = null
15
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerlist/ui/GreenDayEntryAdapter.kt:58:5Line detected, which is longer than the defined maximum line length in the code style.
55 }
56
57
58 fun updateWithData(trackerEntries: MutableList<TrackerEntry?>?, isGreenDayUpdatable: Boolean?, selectedDate: DateTime?) {
59 if (isGreenDayUpdatable != null) {
60 this.isGreenDayUpdatable = isGreenDayUpdatable
61 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerlist/ui/GreenDayListFragment.kt:88:5Line detected, which is longer than the defined maximum line length in the code style.
85 RootFragment {
86
87 private var binding: ActivityGreenDayBinding? = null
88 private var activityWasPaused: Boolean = false // need to track state to skip 2nd refresh in onResume() right after onActivityCreated()
89
90 private var batterySaverModeWatcher: BatterySaverModeWatcher? = null
91 private var batterySaverModeNotificationWasShown = false
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerlist/ui/GreenDayListFragment.kt:185:33Line detected, which is longer than the defined maximum line length in the code style.
182 AnalyticsCore.pageView(GeneralAnalytics.Page.GreenDay.GREEN_DAY)
183 .siteSectionAndContentType(
184 NotificationAttributes.getSiteSection(
185 NotificationAttributes.wasStartedByPush(this, false), GeneralAnalytics.MenuPage.GREEN_DAY),
186 GeneralAnalytics.MenuPage.GREEN_DAY)
187
188 showTrackers()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerlist/ui/GreenDayListFragment.kt:191:13Line detected, which is longer than the defined maximum line length in the code style.
188 showTrackers()
189
190 if (NetworkUtil.isNetworkAvailable(requireContext())) {
191 SocketConnection.registerForSocketConnection(lifecycle, EventType.GDT_UPDATED, object : ClientWebSocket.MessageListener {
192 override fun onSocketMessage(message: String?, params: JsonElement?) {
193 runOnUiThread {
194 removeAllViewsFromTrackerContainter()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerlist/ui/GreenDayListFragment.kt:233:9Line detected, which is longer than the defined maximum line length in the code style.
230 }
231
232 private fun getNormalTracker(greenDayTracker: GreenDayTracker): TrackerEntry {
233 val description = if (presenter != null && presenter!!.anyPendingChangesForType(greenDayTracker.type!!.typeName)) {
234 getString(R.string.pending_changes)
235 } else if (greenDayTracker.type == TrackerType.STEPS
236 && greenDayTracker.hasAnyTrackers()) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerlist/ui/GreenDayListFragment.kt:240:13Line detected, which is longer than the defined maximum line length in the code style.
237 greenDayTracker.trackers!![0].value.toInt().toString() + " " + getString(R.string.steps)
238 } else if (greenDayTracker.type == TrackerType.SLEEP
239 && greenDayTracker.hasAnyTrackers()) {
240 HtmlTool.fromHtml(TrackerSleepUtil.getSleepTextPluralized(greenDayTracker.trackers!![0].value, requireContext())).toString()
241 } else {
242 DetailedTrackerType.getDetailedTrackerType(greenDayTracker).getLocalizedName(resources)
243 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerlist/ui/GreenDayListFragment.kt:251:5Line detected, which is longer than the defined maximum line length in the code style.
248 // a last minute change coming from the product team to show actual values instead of the risk stratification value
249 // https://arnoldmedia.jira.com/browse/FEAT-8422
250 // since every tracker has their own ways to show the actual value – it caused a lot of if-else here
251 // there has already been an announcement to change this in the next (post-Unicorn) release, so consider this code to have
252 // a one-iteration lifecycle
253 private fun getRiskStratifiedTracker(greenDayTracker: GreenDayTracker): TrackerEntry? {
254 return if (greenDayTracker.isNotLegacy()) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerlist/ui/GreenDayListFragment.kt:264:33Line detected, which is longer than the defined maximum line length in the code style.
261 if (greenDayTracker.type == TrackerType.MEDICATION_GROUP || greenDayTracker.hasNoTrackers()) {
262 descriptionBuilder.append(
263 if (!greenDayTracker.riskStratificationDisplay?.labelKey.isNullOrEmpty()) {
264 getString(LabelKeys.fromString(greenDayTracker.riskStratificationDisplay?.labelKey, presenter?.isSelectedDateToday).stringResource)
265 } else if (!greenDayTracker.riskStratificationDisplay?.labelText.isNullOrEmpty()) {
266 greenDayTracker.riskStratificationDisplay?.labelText
267 } else {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerlist/ui/GreenDayListFragment.kt:273:25Line detected, which is longer than the defined maximum line length in the code style.
270 } else
271 // sleep with data to use a formatting util
272 if (greenDayTracker.type == TrackerType.SLEEP) {
273 descriptionBuilder.append(TrackerSleepUtil.getSleepTextPluralized(greenDayTracker.trackers!![0].value, requireContext()))
274 } else {
275 // other trackers with data
276 val units = when (greenDayTracker.type) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerlist/ui/GreenDayListFragment.kt:330:25Line detected, which is longer than the defined maximum line length in the code style.
327 if (presenter != null && presenter!!.anyPendingChangesForType(greenDayTracker.type!!.typeName)) {
328 getString(R.string.pending_changes)
329 } else {
330 HtmlTool.fromHtml(TrackerSleepUtil.getSleepTextPluralized(greenDayTracker.trackers!![0].value, requireContext()))
331 }.toString())
332 }
333 return null
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerlist/ui/GreenDayListFragment.kt:432:13Line detected, which is longer than the defined maximum line length in the code style.
429 if (activityWasPaused && !doWeHaveDeepLink()) {
430 presenter?.getGreenDay(isNetworkAvailable())
431 } else if (doWeHaveDeepLink()) {
432 /*
433 If we received the deeplink for tracker it will be handled and we don't want to keep the information in intent
434 */
435 val args = arguments
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerlist/ui/GreenDayListFragment.kt:534:5Line detected, which is longer than the defined maximum line length in the code style.
531 BloodGlucoseActivity.start(this.getBaseActivity(), selectedDate)
532 }
533
534 override fun navigateToEditBloodGlucoseTracker(selectedDate: DateTime, id: String?, extId: String?, defaultValue: Double?, isLegacyEntryToDelete: Boolean) {
535 BloodGlucoseActivity.start(this.getBaseActivity(), selectedDate, id, extId, defaultValue, isLegacyEntryToDelete)
536 }
537
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerlist/ui/GreenDayListFragment.kt:545:9Line detected, which is longer than the defined maximum line length in the code style.
542 override fun navigateToEditBloodPressureTracker(selectedDate: DateTime, id: String?, extId: String?,
543 defaultValue: Double?, defaultAdditionalValue: Double?,
544 isLegacyEntryToDelete: Boolean) {
545 BloodPressureActivity.start(this.getBaseActivity(), selectedDate, id, extId, defaultValue, defaultAdditionalValue, isLegacyEntryToDelete)
546 }
547
548 override fun navigateToAddWeightTracker(selectedDate: DateTime) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerlist/ui/GreenDayListFragment.kt:672:9Line detected, which is longer than the defined maximum line length in the code style.
669
670 fun openToolTip(itemId: Int) {
671 val settingMenuItemView = requireActivity().findViewById<View>(itemId)
672 val nextItem = ActionItem(getString(R.string.automatic_tracking_tracker_wizard_tooltip), getString(R.string.btn_ok))
673 val quickAction = QuickAction(requireContext())
674 quickAction.addActionItem(nextItem)
675 quickAction.setOnActionItemClickListener(object : OnActionItemClickListener {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerlist/ui/TrackHeaderView.kt:17:2Line detected, which is longer than the defined maximum line length in the code style.
14 import com.sharecare.realgreen.tracker.view.heart.HeartDrawableFactory
15
16 /**
17 * A class for the view for the whole header of Track screen. Delegates a part of UI to its subview - [TrackHeaderRatSubView]
18 */
19 class TrackHeaderView(context: Context, attrs: AttributeSet?) : FrameLayout(context, attrs) {
20
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerms/add/base/presenter/BaseTrackerMsPresenter.kt:32:9Line detected, which is longer than the defined maximum line length in the code style.
29 }
30
31 open fun isSelectedDateToday(): Boolean? {
32 return selectedDate.year == DateTime.now().year && selectedDate.monthOfYear == DateTime.now().monthOfYear && selectedDate.dayOfMonth == DateTime.now().dayOfMonth
33 }
34 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerms/add/base/ui/BaseTrackerMsActivity.kt:68:13Line detected, which is longer than the defined maximum line length in the code style.
65 titleTextView.text = TrackerTypeUtil.getTrackerTypeScreenName(resources, trackerType)
66 descriptionTextView.text = TrackerUtil.getDescription(this@BaseTrackerMsActivity,
67 trackerType.typeName, presenter!!.isSelectedDateToday())
68 trackerImage.background = TrackerViewUtil.getGreenDayTrackerDrawableDefault(this@BaseTrackerMsActivity, trackerType.typeName)
69 }
70 }
71
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerms/add/numeric/base/presenter/BaseNumericInputPresenter.kt:21:1Line detected, which is longer than the defined maximum line length in the code style.
18 * Base presenter for numeric microservice (ms) trackers.
19 * Consider placing here any methods that are used accross all the numeric ms trackers.
20 */
21 abstract class BaseNumericInputPresenter<T : BaseNumericInputMvpView>(private val trackerMsRepository: GreenDayTrackerMsRepository,
22 private val logEntriesRepository: LogEntriesRepository,
23 private val trackerRepository: GreenDayTrackerRepository) :
24 BaseTrackerMsPresenter<T>() {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerms/add/numeric/base/presenter/BaseNumericInputPresenter.kt:22:71Line detected, which is longer than the defined maximum line length in the code style.
19 * Consider placing here any methods that are used accross all the numeric ms trackers.
20 */
21 abstract class BaseNumericInputPresenter<T : BaseNumericInputMvpView>(private val trackerMsRepository: GreenDayTrackerMsRepository,
22 private val logEntriesRepository: LogEntriesRepository,
23 private val trackerRepository: GreenDayTrackerRepository) :
24 BaseTrackerMsPresenter<T>() {
25 private var extId: String? = null
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerms/add/numeric/base/presenter/BaseNumericInputPresenter.kt:23:71Line detected, which is longer than the defined maximum line length in the code style.
20 */
21 abstract class BaseNumericInputPresenter<T : BaseNumericInputMvpView>(private val trackerMsRepository: GreenDayTrackerMsRepository,
22 private val logEntriesRepository: LogEntriesRepository,
23 private val trackerRepository: GreenDayTrackerRepository) :
24 BaseTrackerMsPresenter<T>() {
25 private var extId: String? = null
26 private var id: String? = null
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerms/add/numeric/base/presenter/BaseNumericInputPresenter.kt:38:6Line detected, which is longer than the defined maximum line length in the code style.
35
36 /**
37 * Creates of updates the MicroService tracker.
38 * The method is marked as open only for steps tracker, because it has a standalone sync mechanizm of creating trackers.
39 * Normally this method should NOT be overwritten.
40 */
41 open fun createOrUpdateMsTracker() {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerms/add/numeric/base/ui/BaseNumericInputActivity.kt:16:1Line detected, which is longer than the defined maximum line length in the code style.
13 * The viewBinding parameter represents the layout specifically for the numeric trackers and any
14 * manipulation with it should be represented here.
15 */
16 abstract class BaseNumericInputActivity<Presenter : BaseNumericInputPresenter<MvpView>, MvpView : BaseNumericInputMvpView> :
17 BaseTrackerMsActivity<Presenter, MvpView>(), BaseNumericInputMvpView {
18 private lateinit var viewBinding: FragmentTrackerContainerBinding
19
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerms/add/numeric/bloodpressure/ui/BloodPressureActivity.kt:69:19Line detected, which is longer than the defined maximum line length in the code style.
66 @JvmStatic
67 // for editing an existing entry
68 fun start(activity: Activity, selectedDate: DateTime, id: String?, extId: String?,
69 valueToStartWith: Double?, additionalValueToStartWith: Double?, isLegacyEntryToDelete: Boolean? = false) {
70 val intent = Intent(activity, BloodPressureActivity::class.java)
71 intent.putExtra(BaseTrackerActivityCompanion.SELECTED_DATE, selectedDate)
72 extId?.let { intent.putExtra(EXTRA_EXT_ID, it) }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerms/add/numeric/inputview/ui/NumericTrackerInputView.kt:40:5Line detected, which is longer than the defined maximum line length in the code style.
37 presenter = NumericTrackerInputPresenter(this, TrackerMeasurementDataRepository())
38 }
39
40 constructor(context: Context, @Nullable attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr) {
41 inflate()
42 presenter = NumericTrackerInputPresenter(this, TrackerMeasurementDataRepository())
43 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerms/add/numeric/inputview/ui/NumericTrackerInputView.kt:45:5Line detected, which is longer than the defined maximum line length in the code style.
42 presenter = NumericTrackerInputPresenter(this, TrackerMeasurementDataRepository())
43 }
44
45 constructor(context: Context, @Nullable attrs: AttributeSet, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes) {
46 inflate()
47 presenter = NumericTrackerInputPresenter(this, TrackerMeasurementDataRepository())
48 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerms/add/numeric/inputview/ui/NumericTrackerInputView.kt:164:17Line detected, which is longer than the defined maximum line length in the code style.
161 private fun setError() {
162 with(binding) {
163 if (textInputContainer.visible) {
164 textInputContainer.setErrorTextColor(ColorStateList.valueOf(ContextCompat.getColor(context, R.color.alert)))
165 textInputContainer.boxStrokeErrorColor = ColorStateList.valueOf(ContextCompat.getColor(context, R.color.alert))
166 textInputContainer.errorIconDrawable = ContextCompat.getDrawable(context, R.drawable.ic_tofu_error_alert)
167 textInputContainer.requestFocus()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerms/add/numeric/inputview/ui/NumericTrackerInputView.kt:165:17Line detected, which is longer than the defined maximum line length in the code style.
162 with(binding) {
163 if (textInputContainer.visible) {
164 textInputContainer.setErrorTextColor(ColorStateList.valueOf(ContextCompat.getColor(context, R.color.alert)))
165 textInputContainer.boxStrokeErrorColor = ColorStateList.valueOf(ContextCompat.getColor(context, R.color.alert))
166 textInputContainer.errorIconDrawable = ContextCompat.getDrawable(context, R.drawable.ic_tofu_error_alert)
167 textInputContainer.requestFocus()
168 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerms/add/numeric/inputview/ui/NumericTrackerInputView.kt:166:17Line detected, which is longer than the defined maximum line length in the code style.
163 if (textInputContainer.visible) {
164 textInputContainer.setErrorTextColor(ColorStateList.valueOf(ContextCompat.getColor(context, R.color.alert)))
165 textInputContainer.boxStrokeErrorColor = ColorStateList.valueOf(ContextCompat.getColor(context, R.color.alert))
166 textInputContainer.errorIconDrawable = ContextCompat.getDrawable(context, R.drawable.ic_tofu_error_alert)
167 textInputContainer.requestFocus()
168 }
169 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerms/add/numeric/inputview/ui/NumericTrackerInputView.kt:175:17Line detected, which is longer than the defined maximum line length in the code style.
172 private fun clearError() {
173 with(binding) {
174 if (textInputContainer.visible) {
175 textInputContainer.setErrorTextColor(ColorStateList.valueOf(ContextCompat.getColor(context, R.color.type_medium)))
176 textInputContainer.errorIconDrawable = null
177 textInputContainer.boxStrokeErrorColor = ColorStateList.valueOf(ContextCompat.getColor(context, R.color.type_low))
178 textInputContainer.requestFocus()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerms/add/numeric/inputview/ui/NumericTrackerInputView.kt:177:17Line detected, which is longer than the defined maximum line length in the code style.
174 if (textInputContainer.visible) {
175 textInputContainer.setErrorTextColor(ColorStateList.valueOf(ContextCompat.getColor(context, R.color.type_medium)))
176 textInputContainer.errorIconDrawable = null
177 textInputContainer.boxStrokeErrorColor = ColorStateList.valueOf(ContextCompat.getColor(context, R.color.type_low))
178 textInputContainer.requestFocus()
179 }
180 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerms/add/numeric/steps/presenter/StepsPresenter.kt:22:22Line detected, which is longer than the defined maximum line length in the code style.
19 logEntriesRepository: LogEntriesRepository,
20 trackerRepository: GreenDayTrackerRepository,
21 private val manualStepsBucketRecordDataRepository: ManualStepsBucketRecordDataRepository,
22 private val helpDismissedSettingsRepository: HelpDismissedSettingsRepository = HelpDismissedSettingsDataRepository()) :
23 BaseNumericInputPresenter<StepsMvpView>(trackerMsRepository, logEntriesRepository, trackerRepository) {
24
25 override val trackerType: TrackerType = TrackerType.STEPS
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerms/add/numeric/steps/ui/StepsActivity.kt:34:13Line detected, which is longer than the defined maximum line length in the code style.
31 presenter?.setInitialValue(intent?.getSerializableExtra(EXTRA_VALUE_TO_START_WITH) as Double?)
32 presenter?.initUi()
33 if (presenter?.shouldShowTrackerWizard() == true) {
34 AutomaticTrackingWizardActivity.startActivityForResult(this, AutomaticTrackingWizardActivity.AUTOMATIC_WIZARD_REQUEST_CODE_RESULT, WizardType.SUBMISSION)
35 }
36 }
37
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerms/add/numeric/steps/ui/StepsActivity.kt:40:9Line detected, which is longer than the defined maximum line length in the code style.
37
38 override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
39 super.onActivityResult(requestCode, resultCode, data)
40 if (requestCode == AutomaticTrackingWizardActivity.AUTOMATIC_WIZARD_REQUEST_CODE_RESULT && TrackerPreferenceStore.getRepo().isStepsAutoTracked()) {
41 this.startActivity(BaseTrackerActivityCompanion.createAutomaticTrackerIntent(this))
42 finish()
43 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerms/add/sleep/presenter/SleepTrackerPresenter.kt:16:29Line detected, which is longer than the defined maximum line length in the code style.
13 import com.sharecare.realgreen.tracker.util.GdtUtil
14
15 class SleepTrackerPresenter(val trackerMsRepository: GreenDayTrackerMsRepository,
16 private val helpDismissedSettingsRepository: HelpDismissedSettingsRepository = HelpDismissedSettingsDataRepository()) : ManualTrackerPresenter<SleepTrackerMvpView>() {
17
18 fun submitTracker(sleepTracker: SleepTracker) {
19 val trackerService = ServiceFactory.getInstance()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerms/add/sleep/ui/SleepInnerView.kt:126:9Line detected, which is longer than the defined maximum line length in the code style.
123 // or we edit a tracker (extId = "some value")
124 // so we init extId as an empty string to treat it as an exsisting tracker because on the feed we never
125 // create one
126 initWithData(DateTime(riseDateTime, DateTimeZone.forID(zoneId)), // this is a default value and it won't be used because we have a valid sleep
127 // and rise date times
128 DateTime(sleepDateTime, DateTimeZone.forID(zoneId)),
129 DateTime(riseDateTime, DateTimeZone.forID(zoneId)),
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerms/add/sleep/ui/SleepInnerView.kt:180:9Line detected, which is longer than the defined maximum line length in the code style.
177 dateTime: DateTime,
178 title: String,
179 action: String) {
180 val timeDialog = TofuTimePickerDialog.newInstance(TimePickerDialog.OnTimeSetListener { _, hourOfDay, minuteOfHour, _ ->
181 val correctedDate = DateTime(dateTime.year, dateTime.monthOfYear,
182 dateTime.dayOfMonth, hourOfDay, minuteOfHour)
183 presenter.analyticsActions.add(action)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerms/add/sleep/ui/SleepManualTrackerActivity.kt:30:1Line detected, which is longer than the defined maximum line length in the code style.
27 import com.sharecare.realgreen.tracker.util.TrackerSleepUtil
28 import org.joda.time.DateTime
29
30 class SleepManualTrackerActivity : ManualTrackerActivity<SleepTrackerPresenter, SleepTrackerMvpView>(), SleepTrackerMvpView {
31
32 private var sleepBinding: FragmentTrackerSleepBinding? = null
33
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerms/add/sleep/ui/SleepManualTrackerActivity.kt:46:13Line detected, which is longer than the defined maximum line length in the code style.
43 )
44
45 if (presenter!!.shouldShowTrackerWizardForSubmission()) {
46 AutomaticTrackingWizardActivity.startActivityForResult(this, AutomaticTrackingWizardActivity.AUTOMATIC_WIZARD_REQUEST_CODE_RESULT, WizardType.SUBMISSION)
47 }
48 }
49
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerms/edit/presenter/EntriesListPresenter.kt:176:37Line detected, which is longer than the defined maximum line length in the code style.
173 trackerType.typeName,
174 null,
175 trackerRequest.id,
176 UUID.randomUUID().toString(), // extId is needed as a primary key (we won't send it to the server)
177 GdtUtil.ApiCallTypes.DELETE.apiCallType,
178 selectedDate)
179 trackerMsRepository.createTrackerLocally(record)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerms/edit/presenter/EntriesListPresenter.kt:348:25Line detected, which is longer than the defined maximum line length in the code style.
345 RxWrapperUtil.create {
346 val trackerService = ServiceFactory.getInstance()
347 .createService(ServiceFactory.ServiceType.TRACKER) as TrackerService
348 val stepsTrackersAggregationResponce = trackerService.getAggregatedEntriesForStepsTracker(TrackerUtil
349 .dateFormatted(selectedDate))
350 entries = stepsTrackersAggregationResponce.aggs
351 .filter { it.count.toInt() > 0 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerms/edit/presenter/EntriesListPresenter.kt:362:25Line detected, which is longer than the defined maximum line length in the code style.
359 DateTime.parse(trackerAggregationData.lastUpdateDate),
360 trackerAggregationData.groupName)
361 }
362 entries.filter { it.isEditable() && !manualStepsBucketRecordDataRepository.isInLocalRepository(it.externalId) }
363 .forEach {
364 manualStepsBucketRecordDataRepository.createOrUpdateRecord(ManualStepsBucket
365 .fromServerEntryToRecord(it))
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerms/edit/ui/EntriesListActivity.kt:103:13Line detected, which is longer than the defined maximum line length in the code style.
100 super.onResume()
101 presenter!!.fetchEntriesAndUpdateView()
102 if (NetworkUtil.isNetworkAvailable(this)) {
103 SocketConnection.registerForSocketConnection(lifecycle, EventType.GDT_UPDATED, object : ClientWebSocket.MessageListener {
104 override fun onSocketMessage(message: String?, params: JsonElement?) {
105 runOnUiThread { presenter!!.fetchEntriesAndUpdateView() }
106 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerms/edit/ui/EntriesListActivity.kt:141:13Line detected, which is longer than the defined maximum line length in the code style.
138 setupToolbar()
139
140 if (presenter!!.shouldShowAutomaticTrackingTip()) {
141 TrackerSupportLinkUtil.injectAutomaticTrackingCustomerSupportPath(this, binding.subtitleTextView, presenter!!.getTrackerType().typeName)
142 binding.subtitleTextView.visibility = View.VISIBLE
143 } else {
144 binding.subtitleTextView.visibility = View.GONE
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerms/edit/ui/EntriesListActivity.kt:221:5Line detected, which is longer than the defined maximum line length in the code style.
218 BloodGlucoseActivity.start(this, selectedDate)
219 }
220
221 override fun navigateToEditBloodGlucoseEntry(selectedDate: DateTime, id: String?, extId: String?, value: Double, isLegacyEntryToDelete: Boolean) {
222 BloodGlucoseActivity.start(this, selectedDate, id, extId, value, isLegacyEntryToDelete)
223 }
224
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerms/edit/ui/EntriesListActivity.kt:242:5Line detected, which is longer than the defined maximum line length in the code style.
239 WeightActivity.start(this, selectedDate)
240 }
241
242 override fun navigateToEditWeightEntry(selectedDate: DateTime, id: String?, extId: String?, value: Double, isLegacyEntryToDelete: Boolean) {
243 WeightActivity.start(this, selectedDate, id, extId, value, isLegacyEntryToDelete)
244 }
245
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerms/edit/ui/EntriesListActivity.kt:250:5Line detected, which is longer than the defined maximum line length in the code style.
247 SmokeActivity.start(this, selectedDate)
248 }
249
250 override fun navigateToEditSmokeEntry(selectedDate: DateTime, id: String?, extId: String?, value: Double, isLegacyEntryToDelete: Boolean) {
251 SmokeActivity.start(this, selectedDate, id, extId, value, isLegacyEntryToDelete)
252 }
253
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/presentation/trackerms/edit/ui/EntriesListActivity.kt:258:5Line detected, which is longer than the defined maximum line length in the code style.
255 AlcoholActivity.start(this, selectedDate)
256 }
257
258 override fun navigateToEditAlcoholEntry(selectedDate: DateTime, id: String?, extId: String?, value: Double, isLegacyEntryToDelete: Boolean) {
259 AlcoholActivity.start(this, selectedDate, id, extId, value, isLegacyEntryToDelete)
260 }
261
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/service/gdt/service/TrackersUploader.kt:45:21Line detected, which is longer than the defined maximum line length in the code style.
42 }
43 }
44 } catch (e: IllegalArgumentException) {
45 L.e(TrackersSyncJobService::class.java.name, "unable to convert date key to an epoch date " + e.message)
46 }
47
48 trackerData.setDate(date)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/service/sleep/service/MotionCollectingService.kt:76:21Line detected, which is longer than the defined maximum line length in the code style.
73 storeWindow(window)
74 }
75
76 // there used to be a time frame for storing motion sensor entries, but now we store them all day long due to the server algorithm
77 // this may cause a crash on some devices when they are low on storage
78 // it happens when users would not open the app for some days and won't trigger the sync process
79 // so the app keeps storing the motion data in the database
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/service/sleep/service/MotionCollectingService.kt:84:21Line detected, which is longer than the defined maximum line length in the code style.
81 // we have to do it in background due to the reason described above
82 removeOldEntries()
83
84 val motionSensorEntry = MotionSensorEntry(epochNow, detectedActivity.confidence, DetectedActivityTypeUtil
85 .getActivityTypeString(resources, detectedActivity.type))
86 storeEntry(motionSensorEntry)
87 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/service/steps/StepsTrackingWrapper.kt:27:1Line detected, which is longer than the defined maximum line length in the code style.
24 AndroidSdkStepsService.start(context)
25 }
26 //TODO: ORIGAMI - this Tool is now a part of ORIGAMI project and won't be used here
27 // if (com.sharecare.realgreen.origami.tool.sources.GoogleFitTool.isGoogleFitInstalled(context.applicationContext)
28 // && com.sharecare.realgreen.origami.tool.sources.GoogleFitTool.isUserSubscribed(context)) {
29 // JobScheduler.get().scheduleJob(TrackerJobFactory.createGetStepsFromGoogleFitAndStoreInDbJob())
30 // JobScheduler.get().scheduleJob(TrackerJobFactory.createGetStepsFromGoogleFitAndStoreInDbNowJob())
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/service/steps/job/StepsDispatchJobServiceProxy.kt:9:2Line detected, which is longer than the defined maximum line length in the code style.
6 import com.sharecare.realgreen.core.util.NetworkUtil
7
8 /**
9 * The actual logic for uploading steps info since it is used both in [StepsDispatchJobServiceFirebase] and [StepsDispatchJobServiceNative]
10 */
11 class StepsDispatchJobServiceProxy(private val finishable: Finishable) {
12
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/service/steps/job/StepsUploader.kt:58:21Line detected, which is longer than the defined maximum line length in the code style.
55 null,
56 DateTime().withZone(DateTimeZone.forID(bucketRecord.dateTimeZoneId)).withMillis(bucketRecord
57 .startDate),
58 DateTime().withZone(DateTimeZone.forID(bucketRecord.dateTimeZoneId)).withMillis(bucketRecord.endDate),
59 bucketRecord.value,
60 bucketRecord.bucketId
61 ))
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/service/steps/job/StepsUploader.kt:68:21Line detected, which is longer than the defined maximum line length in the code style.
65 bucketRecord.serverId,
66 ChannelType.SHARECARE,
67 Source.SourceType.FT_STEPS.name,
68 DateTime().withZone(DateTimeZone.forID(bucketRecord.dateTimeZoneId)).withMillis(bucketRecord.startDate),
69 DateTime().withZone(DateTimeZone.forID(bucketRecord.dateTimeZoneId)).withMillis(bucketRecord.endDate),
70 bucketRecord.value,
71 bucketRecord.bucketId
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/service/steps/job/StepsUploader.kt:69:21Line detected, which is longer than the defined maximum line length in the code style.
66 ChannelType.SHARECARE,
67 Source.SourceType.FT_STEPS.name,
68 DateTime().withZone(DateTimeZone.forID(bucketRecord.dateTimeZoneId)).withMillis(bucketRecord.startDate),
69 DateTime().withZone(DateTimeZone.forID(bucketRecord.dateTimeZoneId)).withMillis(bucketRecord.endDate),
70 bucketRecord.value,
71 bucketRecord.bucketId
72 ))
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/service/steps/job/StepsUploader.kt:103:21Line detected, which is longer than the defined maximum line length in the code style.
100 }
101 stepsTrackers.add(StepsTracker.createManual(
102 bucketRecord.serverId,
103 DateTime().withZone(DateTimeZone.forID(bucketRecord.dateTimeZoneId)).withMillis(bucketRecord.endDate),
104 bucketRecord.value,
105 bucketRecord.bucketId
106 ))
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/service/steps/job/StepsUploader.kt:121:37Line detected, which is longer than the defined maximum line length in the code style.
118 val manualBucketRecords = mutableListOf<ManualStepsBucketRecord>()
119 for (trackerIdData in response.trackers) {
120 if (trackerIdData.channelType.equals(ChannelType.GOOGLE_FIT.name)) {
121 val bucketRecord = googleFitStepsBucketRecordDataRepository.getBucketForExternalId(trackerIdData.extId)
122 if (bucketRecord != null) {
123 bucketRecord.serverId = trackerIdData.id
124 bucketRecord.isIncludeToSync = false
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/service/steps/job/StepsUploader.kt:130:41Line detected, which is longer than the defined maximum line length in the code style.
127 } else if (trackerIdData.channelType.equals(ChannelType.SHARECARE.name)) {
128 if (trackerIdData.source != null
129 && trackerIdData.source.equals(StepsSourceType.USER.name)) {
130 val bucketRecord = manualStepsBucketRecordDataRepository.getBucketForExternalId(trackerIdData.extId)
131 if (bucketRecord != null) {
132 bucketRecord.serverId = trackerIdData.id
133 bucketRecord.isIncludeToSync = false
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/service/steps/job/StepsUploader.kt:137:41Line detected, which is longer than the defined maximum line length in the code style.
134 manualBucketRecords.add(bucketRecord)
135 }
136 } else {
137 val bucketRecord = androidSdkStepsBucketRecordDataRepository.getBucketForExternalId(trackerIdData.extId)
138 if (bucketRecord != null) {
139 bucketRecord.serverId = trackerIdData.id
140 bucketRecord.isIncludeToSync = false
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/service/steps/model/AndroidSdkStepsBucket.kt:31:21Line detected, which is longer than the defined maximum line length in the code style.
28 val stepsBucket = AndroidSdkStepsBucket(DateTimeZone.getDefault())
29 stepsBucket.value = value
30 val startDateTime = valueReceivedDateTime
31 .withMinuteOfHour(if (valueReceivedDateTime.minuteOfHour < BUCKET_LENGTH_IN_MINUTES) 0 else BUCKET_LENGTH_IN_MINUTES)
32 .withSecondOfMinute(0)
33 .withMillisOfSecond(0)
34 stepsBucket.startDate = startDateTime.millis
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/service/steps/model/GoogleFitStepsBucket.kt:23:9Line detected, which is longer than the defined maximum line length in the code style.
20 companion object {
21 // creates a bucket from the Google Fit value
22 // we don't care about the bucket length here (as we've requested a valid bucket length in GoogleFitTool)
23 fun fromGoogleFit(value: Int, startDate: Long, endDate: Long, dateTimeZone: DateTimeZone): GoogleFitStepsBucket {
24 val stepsBucket = GoogleFitStepsBucket(dateTimeZone)
25 stepsBucket.startDate = startDate
26 stepsBucket.endDate = endDate
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/service/steps/service/GoogleFitStepsJobService.kt:22:1Line detected, which is longer than the defined maximum line length in the code style.
19 // can be longer than first sending and in such case User will not see the latest value in app
20 //TODO: ORIGAMI - this Tool is now a part of ORIGAMI project and won't be used here
21 // RxWrapperUtil.create {
22 // com.sharecare.realgreen.origami.tool.sources.GoogleFitTool.getRecordedStepsHistory(this@GoogleFitStepsJobService, object : com.sharecare.realgreen.origami.tool.sources.GoogleFitTool
23 // .RequestListener<DataReadResponse> {
24 // override fun onSuccess(result: DataReadResponse) {
25 // this@GoogleFitStepsJobService.jobFinished(jobParameters, false)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/tool/batterysaver/BatterySaverModeNotification.kt:25:25Line detected, which is longer than the defined maximum line length in the code style.
22 .setContentTitle(context.getString(R.string.notification_battery_saver_title))
23 .setContentText(context.getString(R.string.notification_battery_saver_content))
24 .setContentIntent(
25 NotificationCoreUtils.getPendingIntent(context, RootNavigator.makeIntent(RootDestination.TRACK), 0)
26 ).build()
27 NotificationCoreUtils.notify(context, notification, NOTIFICATION_ID)
28 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/tool/realminteraction/CommonAppRealmInteraction.kt:113:1Line detected, which is longer than the defined maximum line length in the code style.
110 }
111
112
113 fun AggregatedActivityRecognitionRecord.setAggregatedActivityRecognitionWindow(window: AggregatedActivityRecognitionWindow) {
114 setJsonData(GsonBuilder()
115 .serializeSpecialFloatingPointValues()
116 .create().toJson(window, AggregatedActivityRecognitionWindow::class.java))
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/type/deeplink/TrackerLinkParsers.kt:34:21Line detected, which is longer than the defined maximum line length in the code style.
31
32 val trackerDestination = TrackerDestinationData(it,
33 TRACKER_ENTER == pathSegments.getOrNull(MODE_PARAM_INDEX),
34 it in TrackerSubDestination.trackersPossibleToConfig && TRACKER_CONFIG == pathSegments.getOrNull(MODE_PARAM_INDEX))
35
36 val bundle = createTrackerBundle(trackerDestination)
37
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/util/ActiveSleepDevUtil.kt:61:25Line detected, which is longer than the defined maximum line length in the code style.
58 val sharedPreferences = context.getSharedPreferences(PREFS_FILE_NAME, Context.MODE_PRIVATE)
59 return OverwrittenSettings(
60 if (sharedPreferences.getBoolean(Property.TRACK_START_TIME_IS_OVERRIDE.name, false))
61 sharedPreferences.getInt(Property.TRACK_START_TIME_HOURS.name, SensorPresenter.Config.START_HOUR)
62 else null,
63 if (sharedPreferences.getBoolean(Property.TRACK_START_TIME_IS_OVERRIDE.name, false))
64 sharedPreferences.getInt(Property.TRACK_START_TIME_MINUTES.name, SensorPresenter.Config.START_MINUTE)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/util/ActiveSleepDevUtil.kt:64:25Line detected, which is longer than the defined maximum line length in the code style.
61 sharedPreferences.getInt(Property.TRACK_START_TIME_HOURS.name, SensorPresenter.Config.START_HOUR)
62 else null,
63 if (sharedPreferences.getBoolean(Property.TRACK_START_TIME_IS_OVERRIDE.name, false))
64 sharedPreferences.getInt(Property.TRACK_START_TIME_MINUTES.name, SensorPresenter.Config.START_MINUTE)
65 else null,
66 if (sharedPreferences.getBoolean(Property.TRACK_END_TIME_IS_OVERRIDE.name, false))
67 sharedPreferences.getInt(Property.TRACK_END_TIME_HOURS.name, SensorPresenter.Config.END_HOUR)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/util/ActiveSleepDevUtil.kt:70:25Line detected, which is longer than the defined maximum line length in the code style.
67 sharedPreferences.getInt(Property.TRACK_END_TIME_HOURS.name, SensorPresenter.Config.END_HOUR)
68 else null,
69 if (sharedPreferences.getBoolean(Property.TRACK_END_TIME_IS_OVERRIDE.name, false))
70 sharedPreferences.getInt(Property.TRACK_END_TIME_MINUTES.name, SensorPresenter.Config.END_MINUTE)
71 else null,
72 if (sharedPreferences.getBoolean(Property.IS_ITEM_RECEIVED_IS_OVERRIDE.name, false))
73 sharedPreferences.getBoolean(Property.IS_ITEM_RECEIVED.name, false)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/util/TrackerSupportLinkUtil.kt:15:9Line detected, which is longer than the defined maximum line length in the code style.
12 object TrackerSupportLinkUtil {
13 @JvmStatic
14 fun injectAutomaticTrackingCustomerSupportPath(context: Context, textView: TextView, typeName: String) {
15 val url = NetworkConfigurationUtils().getAutomaticTrackingCustomerSupportPath(ConfigurationManager().getConfiguration().getNetworkConfiguration())
16 setupTrackerSupportLink(context, url, TrackerViewUtil.getAutomaticTrackerText(context, typeName), textView)
17 }
18
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/util/TrackerSupportLinkUtil.kt:20:9Line detected, which is longer than the defined maximum line length in the code style.
17 }
18
19 fun injectDevicesAndApplicationsSupportCustomerSupportPath(context: Context, textView: TextView) {
20 val url = NetworkConfigurationUtils().getDevicesAndApplicationsSupportCustomerSupportPath(ConfigurationManager().getConfiguration().getNetworkConfiguration())
21 setupTrackerSupportLink(context, url, context.getString(R.string.tracker_monitor_daily_habits_description), textView)
22 }
23
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/util/TrackerSupportLinkUtil.kt:21:9Line detected, which is longer than the defined maximum line length in the code style.
18
19 fun injectDevicesAndApplicationsSupportCustomerSupportPath(context: Context, textView: TextView) {
20 val url = NetworkConfigurationUtils().getDevicesAndApplicationsSupportCustomerSupportPath(ConfigurationManager().getConfiguration().getNetworkConfiguration())
21 setupTrackerSupportLink(context, url, context.getString(R.string.tracker_monitor_daily_habits_description), textView)
22 }
23
24 fun injectLivingInGreenScaleTrackerCustomerSupportPath(context: Context, textView: TextView) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/util/TrackerSupportLinkUtil.kt:25:9Line detected, which is longer than the defined maximum line length in the code style.
22 }
23
24 fun injectLivingInGreenScaleTrackerCustomerSupportPath(context: Context, textView: TextView) {
25 val url = NetworkConfigurationUtils().getLivingInGreenScaleTrackerCustomerSupportPath(ConfigurationManager().getConfiguration().getNetworkConfiguration())
26 setupTrackerSupportLink(context, url, context.getString(R.string.tracker_living_in_the_green_scale_description), textView)
27 }
28
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_tracker/src/main/java/com/sharecare/realgreen/tracker/util/TrackerSupportLinkUtil.kt:26:9Line detected, which is longer than the defined maximum line length in the code style.
23
24 fun injectLivingInGreenScaleTrackerCustomerSupportPath(context: Context, textView: TextView) {
25 val url = NetworkConfigurationUtils().getLivingInGreenScaleTrackerCustomerSupportPath(ConfigurationManager().getConfiguration().getNetworkConfiguration())
26 setupTrackerSupportLink(context, url, context.getString(R.string.tracker_living_in_the_green_scale_description), textView)
27 }
28
29 private fun setupTrackerSupportLink(context: Context, url: String, text: String, textView: TextView) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_user_wallet/src/main/java/com/sharecare/realgreen/wallet/WalletAnalytics.kt:34:9Line detected, which is longer than the defined maximum line length in the code style.
31
32 fun reportWalmartDetailsPage(walmartWalletCard: WalmartWalletCard) {
33 val pageName =
34 "${walmartWalletCard.group.capitalize()} - ${walmartWalletCard.type.capitalize()} - ${walmartWalletCard.details?.title}"
35 val contentType = "${walmartWalletCard.group.capitalize()} - ${walmartWalletCard.type.capitalize()}"
36 AnalyticsCore.pageView(pageName).siteSectionAndContentType(HEALTH_WALLET, contentType)
37 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_user_wallet/src/main/java/com/sharecare/realgreen/wallet/WalletAnalytics.kt:43:5Line detected, which is longer than the defined maximum line length in the code style.
40 walletCard: WalmartWalletCard,
41 walmartPurse: WalmartCardDetail.Purse
42 ) {
43 val pageName = "${walletCard.group.capitalize()} - ${walletCard.type.capitalize()} - ${walmartPurse.title} - $TRANSACTIONS"
44 val contentType = "${walletCard.group.capitalize()} - ${walletCard.type.capitalize()}"
45 AnalyticsCore.pageView(pageName).siteSectionAndContentType(HEALTH_WALLET, contentType)
46 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_user_wallet/src/main/java/com/sharecare/realgreen/wallet/WalletAnalytics.kt:52:5Line detected, which is longer than the defined maximum line length in the code style.
49 walletCard: WalmartWalletCard,
50 walmartPurse: WalmartCardDetail.Purse?
51 ) {
52 val pageName = "${walletCard.group.capitalize()} - ${walletCard.type.capitalize()} - ${walmartPurse?.title} - $RESTRICTIONS"
53 val contentType = "${walletCard.group.capitalize()} - ${walletCard.type.capitalize()}"
54 AnalyticsCore.pageView(pageName).siteSectionAndContentType(HEALTH_WALLET, contentType)
55 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_user_wallet/src/main/java/com/sharecare/realgreen/wallet/repo/WalletImageProvider.kt:25:1Line detected, which is longer than the defined maximum line length in the code style.
22 import java.lang.ref.WeakReference
23
24
25 class WalletImageProvider(private val context: Context, private val picasso: Picasso, private val securePicasso: Picasso) : ImageProvider {
26 companion object {
27 const val ANIMATION_DURATION_IN_MILLS = 500L
28 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_user_wallet/src/main/java/com/sharecare/realgreen/wallet/repo/WalletImageProvider.kt:45:5Line detected, which is longer than the defined maximum line length in the code style.
42 provide(url, secure, imageTransformation).withBackgroundSchedulers().subscribe()
43 }
44
45 override fun loadInto(url: String?, secure: Boolean, finalContainer: ImageView?, imageTransformation: Transformation?): Disposable {
46 finalContainer ?: return EmptyCompletableObserver()
47 url ?: return EmptyCompletableObserver()
48 val imageViewReference = WeakReference(finalContainer)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_user_wallet/src/main/java/com/sharecare/realgreen/wallet/services/WalletService.kt:126:5Line detected, which is longer than the defined maximum line length in the code style.
123 fun fetchWalmartTransactions(promotionId: String, clientAccountId: String): Single<JsonObject> =
124 bearerProxy.fetchWalmartTransactions(promotionId, this.entityWithAccountId, clientAccountId)
125
126 fun fetchRawFile(imagePath: String): Single<ResponseBody> = bearerProxy.fetchRawFile(imagePath, this.entityWithAccountId)
127
128 fun saveCardsOrder(order: CardsOrder): Completable = bearerProxy.saveCardsOrder(order, this.entityWithAccountId)
129
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_user_wallet/src/main/java/com/sharecare/realgreen/wallet/services/WalletService.kt:135:9Line detected, which is longer than the defined maximum line length in the code style.
132 fun fetchInsuranceCards(@Query("account") entityReference: String): Single<JsonObject>
133
134 @GET("/insurance-cards/card/{recordId}/{view}")
135 fun fetchCustomImage(@Path("recordId") recordId: String, @Path("view") view: String, @Query("width") width: Int, @Query("filetype") fileType: String): Single<ResponseBody>
136
137 @PUT("/insurance-cards/card")
138 fun createCard(@Body insuranceCardRequest: InsuranceCardRequest): Single<JsonObject>
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_user_wallet/src/main/java/com/sharecare/realgreen/wallet/services/WalletService.kt:141:9Line detected, which is longer than the defined maximum line length in the code style.
138 fun createCard(@Body insuranceCardRequest: InsuranceCardRequest): Single<JsonObject>
139
140 @POST("/insurance-cards/card/{recordId}")
141 fun update(@Body insuranceCardRequest: InsuranceCardRequest, @Path("recordId") recordId: String): Single<JsonObject>
142
143 @PUT("/insurance-cards/card/{recordId}/{view}")
144 fun updateView(@Body form: RequestBody, @Path("recordId") recordId: String, @Path("view") view: String, @Query("account") entityReference: String): Single<JsonObject>
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_user_wallet/src/main/java/com/sharecare/realgreen/wallet/services/WalletService.kt:144:9Line detected, which is longer than the defined maximum line length in the code style.
141 fun update(@Body insuranceCardRequest: InsuranceCardRequest, @Path("recordId") recordId: String): Single<JsonObject>
142
143 @PUT("/insurance-cards/card/{recordId}/{view}")
144 fun updateView(@Body form: RequestBody, @Path("recordId") recordId: String, @Path("view") view: String, @Query("account") entityReference: String): Single<JsonObject>
145
146 @DELETE("/insurance-cards/card/{recordId}")
147 fun deleteCard(@Path("recordId") recordId: String): Completable
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_user_wallet/src/main/java/com/sharecare/realgreen/wallet/services/WalletService.kt:156:9Line detected, which is longer than the defined maximum line length in the code style.
153 fun fetchWalletCards(@Query("account") entityReference: String): Single<WalletCardsFatResponse>
154
155 @GET("/wallet-api/{promotionId}/transactions")
156 fun fetchWalmartTransactions(@Path("promotionId") promotionId: String, @Query("account") entityReference: String, @Query("clientAccountId") clientAccountId: String): Single<JsonObject>
157
158 @GET
159 fun fetchRawFile(@Url path: String, @Query("account") entityReference: String): Single<ResponseBody>
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_user_wallet/src/main/java/com/sharecare/realgreen/wallet/walmart/WalmartCardDetailFragment.kt:38:1Line detected, which is longer than the defined maximum line length in the code style.
35 fun presentDetails(card: WalmartWalletCard? = null)
36 }
37
38 class WalmartCardDetailFragment : RxFragment<WalmartCardDetailPresenter, WalmartCardDetailFragmentView>(), WalmartCardDetailFragmentView, NavigationSuppressor {
39 lateinit var binding: WalletCardDetailWalmartBinding
40
41 companion object {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_user_wallet/src/main/java/com/sharecare/realgreen/wallet/walmart/WalmartCardDetailFragment.kt:104:5Line detected, which is longer than the defined maximum line length in the code style.
101 items.layoutManager = LinearLayoutManager(context, LinearLayoutManager.VERTICAL, false)
102 }
103
104 fun attemptPdfDownload() = withPermissions(PermissionsUtil.PermissionValue.WALLET, R.string.wallet_storage_permission_request) {
105 presenter.downloadPdf(requireContext())
106 presentClarification(R.string.downloading)
107 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_user_wallet/src/main/java/com/sharecare/realgreen/wallet/walmart/WalmartCardDetailTransactionsFragment.kt:26:1Line detected, which is longer than the defined maximum line length in the code style.
23 import com.sharecare.realgreen.feature_user_wallet.R
24
25
26 class WalmartCardDetailTransactionsFragment : RxFragment<WalmartTransactionsPresenter, WalmartCardDetailTransactionsView>(), WalmartCardDetailTransactionsView {
27 lateinit var binding: WalletCardDetailWalmartTransactionsBinding
28
29 private val walmartPurse: WalmartCardDetail.Purse by lazy {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_user_wallet/src/main/java/com/sharecare/realgreen/wallet/walmart/WalmartCardDetailTransactionsFragment.kt:54:9Line detected, which is longer than the defined maximum line length in the code style.
51 }
52
53 override fun presentTransactions(walmartTransactions: WalmartTransactions) {
54 val data = listOf(walmartTransactions) + listOf(getString(R.string.recent_transactions)) + walmartTransactions.transactions
55
56 binding.transactions.apply {
57 val transactionsAdapter = WalmartTransactionsAdapter(data)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_user_wallet/src/main/java/com/sharecare/realgreen/wallet/walmart/WalmartTransactionsPresenter.kt:8:1Line detected, which is longer than the defined maximum line length in the code style.
5 import com.sharecare.realgreen.wallet.model.WalmartTransactions
6 import com.sharecare.realgreen.wallet.repo.WalletRepository
7
8 class WalmartTransactionsPresenter(private val walmartPurse: WalmartCardDetail.Purse) : RxPresenter<WalmartCardDetailTransactionsView>() {
9 private val repo = WalletRepository()
10
11 override fun onViewAttached() = inParallel(repo.fetchWalmartTransactions(walmartPurse)) { transactions: WalmartTransactions ->
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_user_wallet/src/main/java/com/sharecare/realgreen/wallet/walmart/WalmartTransactionsPresenter.kt:11:5Line detected, which is longer than the defined maximum line length in the code style.
8 class WalmartTransactionsPresenter(private val walmartPurse: WalmartCardDetail.Purse) : RxPresenter<WalmartCardDetailTransactionsView>() {
9 private val repo = WalletRepository()
10
11 override fun onViewAttached() = inParallel(repo.fetchWalmartTransactions(walmartPurse)) { transactions: WalmartTransactions ->
12 getView().presentTransactions(transactions)
13 }
14 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_user_wallet/src/main/java/com/sharecare/realgreen/wallet/walmart/details/WalmartDetailSummary.kt:82:13Line detected, which is longer than the defined maximum line length in the code style.
79 walmartSection.data = it
80 }
81
82 val text = context.getString(R.string.walmart_questions).format(cardDetail.contactUsEmail, cardDetail.faqUrl)
83 binding.questions.text = HtmlTool.fromHtml(text)
84 binding.questions.movementMethod = LinkMovementMethod.getInstance()
85 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_user_wallet/src/main/java/com/sharecare/realgreen/wallet/walmart/details/WalmartPurseCardDisplay.kt:81:17Line detected, which is longer than the defined maximum line length in the code style.
78 if (purse.amount != "$0.00") {
79 binding.expires.visibility = View.VISIBLE
80 val expires = purse.earliestExpirationDate.buildCalendarFindYYYYMMDD()?.formatAsMonthDayYear() ?: ""
81 binding.expires.text = context.getString(R.string.amount_expiry_date, purse.earliestExpirationAmount, expires)
82 } else {
83 binding.expires.visibility = View.GONE
84 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_user_wallet/src/main/java/com/sharecare/realgreen/wallet/widgets/recycleView/SortableRecycleView.kt:28:5Line detected, which is longer than the defined maximum line length in the code style.
25 typealias CalculateSeparation<T> = (itemA: T, itemB: T?, position: Int) -> Int
26
27 interface ImageProvider {
28 fun loadInto(url: String?, secure: Boolean, finalContainer: ImageView?, imageTransformation: Transformation? = null): Disposable
29 fun provide(url: String, secure: Boolean, imageTransformation: Transformation? = null): Single<Bitmap>
30 fun loadInto(url: String?, finalContainer: ImageView?, imageTransformation: Transformation? = null): Disposable
31 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_user_wallet/src/main/java/com/sharecare/realgreen/wallet/widgets/recycleView/SortableRecycleView.kt:119:1Line detected, which is longer than the defined maximum line length in the code style.
116 }
117 }
118
119 abstract class MutableDataAdapter<T, I : RecyclerView.ViewHolder>(var data: MutableList<T>, private var onTouchDown: (T) -> Unit = {}) : RecyclerView.Adapter<I>() {
120 var imageProvider: ImageProvider? = null
121 var onSelection: (WalletCard<*>) -> Unit = {}
122
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_user_wallet/src/main/java/com/sharecare/realgreen/wallet/widgets/recycleView/SortableRecycleView.kt:149:5Line detected, which is longer than the defined maximum line length in the code style.
146 var allowDrag: Boolean = true
147 var onSwap: OnSwap<T> = { _, _ -> }
148
149 override fun onMove(recyclerView: RecyclerView, viewHolder: RecyclerView.ViewHolder, target: RecyclerView.ViewHolder): Boolean {
150 val start = target.adapterPosition
151 val end = viewHolder.adapterPosition
152
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_user_wallet/src/main/java/com/sharecare/realgreen/wallet/widgets/recycleView/SortableRecycleView.kt:177:1Line detected, which is longer than the defined maximum line length in the code style.
174 }
175 }
176
177 class OverlapDecoration<T>(var data: MutableList<T>? = null, var calculateSeparation: CalculateSeparation<T> = { _, _, _ -> 0 }) : RecyclerView.ItemDecoration() {
178 var topMargin: Int = 0
179
180 override fun getItemOffsets(outRect: Rect, view: View, parent: RecyclerView, state: RecyclerView.State) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_user_wallet/src/main/java/com/sharecare/realgreen/wallet/widgets/walletlist/WalletSortableRecycleView.kt:63:1Line detected, which is longer than the defined maximum line length in the code style.
60 )
61 }
62
63 class WalletCardAdapter(data: MutableList<WalletCard<*>> = mutableListOf(), onTouchDown: (WalletCard<*>) -> Unit) : MutableDataAdapter<WalletCard<*>, WalletCardAdapter.ViewHolder>(data, onTouchDown) {
64 private val cardFactory = CardFactory()
65
66 inner class ViewHolder(root: View, val binding: WalletListCardContainerBinding, val card: WalletCardBase) : RecyclerView.ViewHolder(root)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_user_wallet/src/main/java/com/sharecare/realgreen/wallet/widgets/walletlist/WalletSortableRecycleView.kt:66:5Line detected, which is longer than the defined maximum line length in the code style.
63 class WalletCardAdapter(data: MutableList<WalletCard<*>> = mutableListOf(), onTouchDown: (WalletCard<*>) -> Unit) : MutableDataAdapter<WalletCard<*>, WalletCardAdapter.ViewHolder>(data, onTouchDown) {
64 private val cardFactory = CardFactory()
65
66 inner class ViewHolder(root: View, val binding: WalletListCardContainerBinding, val card: WalletCardBase) : RecyclerView.ViewHolder(root)
67
68 override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
69 val context = parent.context
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/feature_user_wallet/src/main/java/com/sharecare/realgreen/wallet/widgets/walletlist/cards/WalletCardBase.kt:120:1Line detected, which is longer than the defined maximum line length in the code style.
117 return doubleBorder
118 }
119
120 fun setSectionColor(context: Context, drawable: LayerDrawable, sectionId: Int, color: String?, default: ColorStateList? = null): ColorStateList {
121 val mainColor = if (color == null) ContextCompat.getColor(context, R.color.surface) else Color.parseColor(color)
122 val colorStateList = if (color == null && default != null) default else ColorStateList.valueOf(mainColor)
123
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/lint-rules/src/main/java/com/sharecare/lint_rules/CustomDeprecatedClassDetector.kt:22:13Line detected, which is longer than the defined maximum line length in the code style.
19 inner class DeprecatedClassHandler(private val context: JavaContext) : UElementHandler() {
20
21 override fun visitCallExpression(node: UCallExpression) {
22 if (node.getExpressionType()?.canonicalText == DEFAULTFEEDMANAGER /*&& node.kind == UastCallKind.CONSTRUCTOR_CALL*/) {
23 System.out.println("visit call expression >>>>>>> " + node.methodName)
24 System.out.println("visit call expression2 >>>>>>> " + node.classReference.toString())
25 System.out.println("visit call expression3 >>>>>>> " + node.receiver.toString())
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/messaging/src/main/java/com/sharecare/realgreen/messaging/Messaging.kt:38:10Line detected, which is longer than the defined maximum line length in the code style.
35
36 /**
37 * A way to notify the feature about user being logged in.
38 * TODO Consider abstracting such notifying into a separate entity, as it is nice to use in other features, probably.
39 */
40 @JvmStatic
41 fun onUserLoggedIn() {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/messaging/src/main/java/com/sharecare/realgreen/messaging/Messaging.kt:47:10Line detected, which is longer than the defined maximum line length in the code style.
44
45 /**
46 * A way to notify the feature about config change
47 * TODO Consider abstracting such notifying into a separate entity, as it is nice to use in other features, probably.
48 */
49 @JvmStatic
50 fun onConfigChange() {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/messaging/src/main/java/com/sharecare/realgreen/messaging/Messaging.kt:56:10Line detected, which is longer than the defined maximum line length in the code style.
53
54 /**
55 * A way to notify the feature about user being logged out.
56 * TODO Consider abstracting such notifying into a separate entity, as it is nice to use in other features, probably.
57 */
58 @JvmStatic
59 fun onUserLoggedOut() {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/messaging/src/main/java/com/sharecare/realgreen/messaging/Messaging.kt:65:10Line detected, which is longer than the defined maximum line length in the code style.
62
63 /**
64 * The Messaging feature require a GCM token to receive messages while being offline.
65 * Messaging is a library and should get such a token from the outside. This is exactly the method to be called for it.
66 */
67 @JvmStatic
68 fun onGcmTokenReady(token: String) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/messaging/src/main/java/com/sharecare/realgreen/messaging/data/RealmCreator.kt:19:9Line detected, which is longer than the defined maximum line length in the code style.
16 val realmFileName = "messaging2.realm"
17 val realmKey = Encryption(context, "messaging_encryption.prefs").getKey()
18
19 //Because of wrong previous migrations we are dropping previous version of database for users who need to migrate.
20 // Flag should be removed after we don't have anymore version 4.23.0 online it would mean that all users have been migrated
21
22 return RealmConfiguration.Builder()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/messaging/src/main/java/com/sharecare/realgreen/messaging/data/RealmCreator.kt:20:9Line detected, which is longer than the defined maximum line length in the code style.
17 val realmKey = Encryption(context, "messaging_encryption.prefs").getKey()
18
19 //Because of wrong previous migrations we are dropping previous version of database for users who need to migrate.
20 // Flag should be removed after we don't have anymore version 4.23.0 online it would mean that all users have been migrated
21
22 return RealmConfiguration.Builder()
23 .name(realmFileName)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/messaging/src/main/java/com/sharecare/realgreen/messaging/data/RealmCreator.kt:34:9Line detected, which is longer than the defined maximum line length in the code style.
31 }
32
33 private fun makeMigration() = RealmMigration { realm, oldVersion, _ ->
34 //All migrations for schema lower than 5 were dropped,due to the wrong migration which was introduced in version 4
35 }
36 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/messaging/src/main/java/com/sharecare/realgreen/messaging/data/offline/OfflineSourceWriter.kt:41:21Line detected, which is longer than the defined maximum line length in the code style.
38 Realm.getInstance(realm).use { rm ->
39 rm.executeTransaction {
40 for (message in topicDaos) {
41 val alreadySavedMessage = OfflineSourceReaderImpl.getTopicQuery(it, message.sponsor, message.reference)
42 .findFirst()
43
44 if (alreadySavedMessage == null) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/messaging/src/main/java/com/sharecare/realgreen/messaging/data/offline/OfflineSourceWriter.kt:52:5Line detected, which is longer than the defined maximum line length in the code style.
49 }
50 }
51
52 fun setUpdatedSinceDt(sponsor: String, topic: String, updatedSinceDt: String, beforeSentDt: String = "", hasMoreMessages: Boolean = true) {
53 Realm.getInstance(realm).use { rm ->
54 rm.executeTransaction {
55 val track = rm.where(TopicTrackDao::class.java)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/messaging/src/main/java/com/sharecare/realgreen/messaging/data/offline/OfflineSourceWriter.kt:78:37Line detected, which is longer than the defined maximum line length in the code style.
75 .equalTo("reference", reference)
76 .findFirst()?.let { messageDao ->
77 messageDao.deleteFromRealm()
78 OfflineSourceReaderImpl.getAttachmentsQuery(it, reference).findAll().deleteAllFromRealm()
79 }
80 it.insert(this)
81 it.insert(message.second.orEmpty())
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/messaging/src/main/java/com/sharecare/realgreen/messaging/data/offline/OfflineSourceWriter.kt:91:17Line detected, which is longer than the defined maximum line length in the code style.
88 fun tryAddMessagesOfflineMessage(message: MessageDAO) {
89 Realm.getInstance(realm).use { rm ->
90 rm.executeTransaction {
91 val alreadySavedMessage = OfflineSourceReaderImpl.getMessagesQuery(it, message.sponsor, message.topicReference)
92 .equalTo("reference", message.reference)
93 .findFirst()
94
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/messaging/src/main/java/com/sharecare/realgreen/messaging/di/MessagingBindingModule.kt:29:5Line detected, which is longer than the defined maximum line length in the code style.
26
27 @Binds
28 @Singleton
29 abstract fun bindNotificationDisplayer(messagingNotificationDisplayerImpl: MessagingNotificationDisplayerImpl): MessagingNotificationDisplayer
30 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/messaging/src/main/java/com/sharecare/realgreen/messaging/domain/ChatManagerImpl.kt:204:9Line detected, which is longer than the defined maximum line length in the code style.
201 private fun checkForNewMessagesHandler(sponsor: String, topic: TopicDao, isLoadMore: Boolean, advocateId: String?) {
202 val topicInfo = offlineSourceReader.getTopicTrackData(realm!!, sponsor, topic.reference)
203 if (isLoadMore && !topicInfo.hasMoreMessages) return
204 val tempUpdatedSinceDt = DateTime.now(DateTimeZone.UTC).toLocalDateTime().toString()//"2020-07-20T20:26:27.024+0530"
205
206 val params =
207 if (isLoadMore) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/messaging/src/main/java/com/sharecare/realgreen/messaging/domain/ChatManagerImpl.kt:220:37Line detected, which is longer than the defined maximum line length in the code style.
217 if (!isLoadMore) {
218 if (!advocateId.isNullOrEmpty()) {
219 globalInjection().get<AdvocacyAnalytics>().reportChatOpen(
220 globalInjection().get<AdvocateRepository>().advocateFlow.value.second.firstOrNull()?.let {
221 when (it.advocateType) {
222 AdvocateType.SPECIFIC -> it.advocateName
223 AdvocateType.GROUP -> it.advocateStatus?.text(context)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/messaging/src/main/java/com/sharecare/realgreen/messaging/domain/ChatManagerImpl.kt:269:9Line detected, which is longer than the defined maximum line length in the code style.
266
267 override fun onConfigChange() {
268 service = ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.MESSAGING) as MessagingService
269 val coachingService = ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.ENROLLMENT) as CoachingEnrollmentService
270 val task = coachingService.getMemberEligibilty().withDefaultSchedulers()
271 RxWrapperUtil.handleDisposable(task = task, onSuccess = { PreferenceStore.setCoachingMemberEligibility(it) })
272 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/messaging/src/main/java/com/sharecare/realgreen/messaging/domain/ChatManagerImpl.kt:277:13Line detected, which is longer than the defined maximum line length in the code style.
274 override fun onUserLoggedIn() {
275 try {
276 context.registerReceiver(networkAvailabilityReceiver, networkAvailabilityIntentFilter)
277 service = ServiceFactory.getInstance().createService(ServiceFactory.ServiceType.MESSAGING) as MessagingService
278 } catch (e: Exception) {
279 e failed "ChatManager - onUserLoggedIn"
280 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/messaging/src/main/java/com/sharecare/realgreen/messaging/domain/ChatManagerImpl.kt:309:33Line detected, which is longer than the defined maximum line length in the code style.
306 .subscribe({
307 if (!advocateId.isNullOrEmpty()) {
308 globalInjection().get<AdvocacyAnalytics>().reportMessageSent(
309 globalInjection().get<AdvocateRepository>().advocateFlow.value.second.firstOrNull()?.let {
310 when (it.advocateType) {
311 AdvocateType.SPECIFIC -> it.advocateName
312 AdvocateType.GROUP -> it.advocateStatus?.text(context)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/messaging/src/main/java/com/sharecare/realgreen/messaging/domain/ChatManagerImpl.kt:321:21Line detected, which is longer than the defined maximum line length in the code style.
318 MessagingAnalytics.onMessageSent(sponsor.sponsorName, topic.title)
319 }
320 unreadMessageReferenceId = getIdFromReference(it.reference)
321 sourceWriter.tryAddMessagesOfflineMessage(it.toOfflineMessage(sponsor.sponsor, topic.reference).first)
322 if (!offlineSourceReader.getTopicTrackData(realm!!, sponsor.sponsor, topic.reference).hasMoreMessages) {
323 setAutoResponseMessages(sponsor.sponsor, topic.autoResponseMessage, topic.reference)
324 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/messaging/src/main/java/com/sharecare/realgreen/messaging/domain/ChatManagerImpl.kt:322:21Line detected, which is longer than the defined maximum line length in the code style.
319 }
320 unreadMessageReferenceId = getIdFromReference(it.reference)
321 sourceWriter.tryAddMessagesOfflineMessage(it.toOfflineMessage(sponsor.sponsor, topic.reference).first)
322 if (!offlineSourceReader.getTopicTrackData(realm!!, sponsor.sponsor, topic.reference).hasMoreMessages) {
323 setAutoResponseMessages(sponsor.sponsor, topic.autoResponseMessage, topic.reference)
324 }
325 }, {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/messaging/src/main/java/com/sharecare/realgreen/messaging/domain/push/MessagingNotificationDisplayerImpl.kt:14:62Line detected, which is longer than the defined maximum line length in the code style.
11
12
13 class MessagingNotificationDisplayerImpl @Inject constructor(private val context: Context,
14 private val sourceReader: OfflineSourceReader) : MessagingNotificationDisplayer {
15
16 private var currentChannelId: String? = null
17
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/messaging/src/main/java/com/sharecare/realgreen/messaging/screens/coachingHome/presenter/CoachingHomePresenter.kt:10:1Line detected, which is longer than the defined maximum line length in the code style.
7 import com.sharecare.realgreen.messaging.screens.coachingHome.ui.CoachingHomeView
8 import javax.inject.Inject
9
10 class CoachingHomePresenter @Inject constructor(private val coachingHomeRepository: CoachingHomeRepository) : MvpPresenter<CoachingHomeView>() {
11
12 private fun getCoachingEnrollmentDetails() {
13 getView().showLoader()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/messaging/src/main/java/com/sharecare/realgreen/messaging/screens/coachingHome/ui/ProgramListAdapter.kt:11:1Line detected, which is longer than the defined maximum line length in the code style.
8 import com.sharecare.realgreen.messaging.R
9 import com.sharecare.realgreen.messaging.databinding.LayoutItemEnrolledProgramBinding
10
11 class ProgramListAdapter(private val coachingPrograms: List<CoachingPrograms>) : RecyclerView.Adapter<ProgramListAdapter.ViewHolder>() {
12
13 override fun getItemCount(): Int {
14 return coachingPrograms.size
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/messaging/src/main/java/com/sharecare/realgreen/messaging/screens/messages/ui/MessagesFragment.kt:60:1Line detected, which is longer than the defined maximum line length in the code style.
57 import org.jetbrains.anko.support.v4.runOnUiThread
58
59
60 class MessagesFragment : BaseMvpFragment<MessagesPresenter, MessagesView>(), MessagesView, MessageAdapterDelegate, NavigationSuppressor {
61
62 private var overallScrollY: Long = 0
63 private lateinit var scrollLayoutManager: FixedTimeScrollLayoutManager
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/messaging/src/main/java/com/sharecare/realgreen/messaging/screens/messages/ui/MessagesFragment.kt:90:9Line detected, which is longer than the defined maximum line length in the code style.
87 override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
88 super.onViewCreated(view, savedInstanceState)
89
90 scrollLayoutManager = FixedTimeScrollLayoutManager(requireContext(), OrientationHelper.VERTICAL, true, overallScrollY)
91 scrollLayoutManager.stackFromEnd = true
92 with(binding) {
93 messagesSend.isEnabled = false
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/messaging/src/main/java/com/sharecare/realgreen/messaging/screens/messages/ui/MessagesFragment.kt:220:17Line detected, which is longer than the defined maximum line length in the code style.
217 )
218 } else if (message.reference == WELCOME_MESSAGE_REFERENCE) {
219 presenter.mTopic!!.externalUrl?.let {
220 MessagingAnalytics.onTapExternalLink(requireActivity(), it, presenter.getSponsor().sponsorName, presenter.mTopic.title)
221 DeepLinkDispatcher.parse(it).start(requireActivity())
222 }
223 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/messaging/src/main/java/com/sharecare/realgreen/messaging/screens/messages/ui/SnackbarWrapper.kt:31:5Line detected, which is longer than the defined maximum line length in the code style.
28 showSnackbar(R.string.messaging_connecting) { }
29 }
30
31 private inline fun showSnackbar(@StringRes text: Int, @StringRes actionText: Int = 0, crossinline action: (() -> Unit)) {
32 hide()
33 snackbar = Snackbar.make(activity.findViewById(android.R.id.content), text, Snackbar.LENGTH_INDEFINITE).apply {
34 setAction(if (actionText == 0) null else activity.getString(actionText)) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/messaging/src/main/java/com/sharecare/realgreen/messaging/screens/messages/ui/adapter/MessageViewHolder.kt:46:9Line detected, which is longer than the defined maximum line length in the code style.
43 TextViewLinksImprover.setTextWithProperSpans(textView, text)
44 textView.setOnClickListener { listener.onMessageClick(model) }
45 }
46 if (model.sentDt != 0L && model.reference != WELCOME_MESSAGE_REFERENCE && model.messageType != MESSAGE_TYPE_EVENT) {
47 timeView?.visible = !(senderNameView != null && model.textContent != null && model.textContent!!.length < 14)
48
49 senderNameView?.visibility = View.VISIBLE
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/messaging/src/main/java/com/sharecare/realgreen/messaging/screens/messages/ui/adapter/MessageViewHolder.kt:47:13Line detected, which is longer than the defined maximum line length in the code style.
44 textView.setOnClickListener { listener.onMessageClick(model) }
45 }
46 if (model.sentDt != 0L && model.reference != WELCOME_MESSAGE_REFERENCE && model.messageType != MESSAGE_TYPE_EVENT) {
47 timeView?.visible = !(senderNameView != null && model.textContent != null && model.textContent!!.length < 14)
48
49 senderNameView?.visibility = View.VISIBLE
50 var dateText = DateLocalizer.formatTime(model.sentDt, TimeStyle.SHORT)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/messaging/src/main/java/com/sharecare/realgreen/messaging/screens/messages/ui/adapter/MessageViewHolder.kt:65:17Line detected, which is longer than the defined maximum line length in the code style.
62 }
63 if (model.isForwardMessage) {
64 with(itemView) {
65 DataBindingAdapters.setImageUrl(findViewById<AppCompatImageView>(R.id.item_message_topic_icon), model.forwardIcon,
66 R.drawable.ic_tofu_avatar_doctor, R.drawable.ic_tofu_avatar_doctor,
67 ImageLoader.Transformation.CIRCLE)
68 setOnClickListener { listener.onMessageClick(model) }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/messaging/src/main/java/com/sharecare/realgreen/messaging/screens/messages/ui/adapter/MessageViewHolder.kt:91:29Line detected, which is longer than the defined maximum line length in the code style.
88 messageAttachments?.forEach { attachment ->
89 LayoutInflater.from(context)
90 .inflate(R.layout.messaging_item_article, this, false)?.apply {
91 DataBindingAdapters.setImageUrl(findViewById<AppCompatImageView>(R.id.article_image), attachment.thumbnail,
92 R.drawable.ic_tofu_image_thumbnail_placeholder, R.drawable.ic_tofu_image_thumbnail_placeholder)
93 setOnClickListener { listener.onAttachmentClick(attachment) }
94 findViewById<ImageView>(R.id.article_icon).setImageResource(
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/messaging/src/main/java/com/sharecare/realgreen/messaging/screens/messages/ui/adapter/MessageViewHolder.kt:92:37Line detected, which is longer than the defined maximum line length in the code style.
89 LayoutInflater.from(context)
90 .inflate(R.layout.messaging_item_article, this, false)?.apply {
91 DataBindingAdapters.setImageUrl(findViewById<AppCompatImageView>(R.id.article_image), attachment.thumbnail,
92 R.drawable.ic_tofu_image_thumbnail_placeholder, R.drawable.ic_tofu_image_thumbnail_placeholder)
93 setOnClickListener { listener.onAttachmentClick(attachment) }
94 findViewById<ImageView>(R.id.article_icon).setImageResource(
95 when (attachment.type) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/messaging/src/main/java/com/sharecare/realgreen/messaging/screens/messages/ui/adapter/MessagesAdapter.kt:13:1Line detected, which is longer than the defined maximum line length in the code style.
10 import com.sharecare.realgreen.messaging.util.SENDER
11
12
13 open class MessagesAdapter(private val delegate: MessageAdapterDelegate) : RecyclerView.Adapter<RecyclerView.ViewHolder>() {
14
15 var adapterModel: MessagesAdapterModel? = null
16 set(newValue) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/messaging/src/main/java/com/sharecare/realgreen/messaging/screens/messages/ui/adapter/MessagesDecoration.kt:189:9Line detected, which is longer than the defined maximum line length in the code style.
186
187 private const val WITH_IN_YEAR = "EEE, MMMM dd"
188 private const val PREVIOUS_YEAR = "EEE, MMM dd, yyyy"
189 private val DATE_FORMAT_THIS_YEAR = DateTimeFormat.forPattern("MMMM dd").withLocale(LocaleCoreUtil.getSupportedJavaLocale())
190 private val DATE_FORMAT_GENERAL = DateTimeFormat.forPattern("MMM dd, yyyy").withLocale(LocaleCoreUtil.getSupportedJavaLocale())
191
192 private val computationRect = Rect()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/messaging/src/main/java/com/sharecare/realgreen/messaging/screens/messages/ui/adapter/MessagesDecoration.kt:190:9Line detected, which is longer than the defined maximum line length in the code style.
187 private const val WITH_IN_YEAR = "EEE, MMMM dd"
188 private const val PREVIOUS_YEAR = "EEE, MMM dd, yyyy"
189 private val DATE_FORMAT_THIS_YEAR = DateTimeFormat.forPattern("MMMM dd").withLocale(LocaleCoreUtil.getSupportedJavaLocale())
190 private val DATE_FORMAT_GENERAL = DateTimeFormat.forPattern("MMM dd, yyyy").withLocale(LocaleCoreUtil.getSupportedJavaLocale())
191
192 private val computationRect = Rect()
193
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/messaging/src/main/java/com/sharecare/realgreen/messaging/screens/sponsor/SponsorAdapter.kt:13:1Line detected, which is longer than the defined maximum line length in the code style.
10 import com.sharecare.realgreen.messaging.R
11 import com.sharecare.realgreen.messaging.databinding.SponsorListItemBinding
12
13 class SponsorAdapter(itemClickListener: ItemClickListener<Sponsor>, items: List<Sponsor>) : FixedListAdapter<Sponsor, BindableViewHolder<Sponsor>>(items) {
14
15 init {
16 this.listener = itemClickListener
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/messaging/src/main/java/com/sharecare/realgreen/messaging/screens/sponsor/SponsorListFragment.kt:100:37Line detected, which is longer than the defined maximum line length in the code style.
97 presenter?.sponsor = item
98 (activity as NavigationProvider).getNavigationController()
99 .goToNextFragment(
100 CoachingTopicsListFragment.makeInstance(item, presenter!!.mIsFromNotification, presenter!!.fromAdvocacyMessageCenter),
101 true, false
102 )
103 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/messaging/src/main/java/com/sharecare/realgreen/messaging/screens/sponsor/SponsorListFragment.kt:122:25Line detected, which is longer than the defined maximum line length in the code style.
119 }
120 (activity as NavigationProvider).getNavigationController()
121 .goToNextFragment(
122 CoachingTopicsListFragment.makeInstance(sponsor, presenter!!.mIsFromNotification, true, presenter!!.fromAdvocacyMessageCenter),
123 true, true
124 )
125 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/messaging/src/main/java/com/sharecare/realgreen/messaging/screens/sponsor/SponsorListFragment.kt:148:13Line detected, which is longer than the defined maximum line length in the code style.
145
146 @JvmStatic
147 fun createPendingIntent(context: Context, fromNotification: Boolean): PendingIntent {
148 val intent = RootNavigator.makeIntent(SponsorListFragment::class.java, makeBundle(fromNotification), context)
149 return PendingIntent.getActivity(context, REQUEST_CODE, intent, PendingIntent.FLAG_IMMUTABLE)
150 }
151 }
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/messaging/src/main/java/com/sharecare/realgreen/messaging/screens/topics/CoachingTopicsListFragment.kt:63:13Line detected, which is longer than the defined maximum line length in the code style.
60 }
61 }, emptyList())
62 if (NetworkUtil.isNetworkAvailable(requireContext())) {
63 SocketConnection.registerForSocketConnection(lifecycle, EventType.NEW_MSG, object : ClientWebSocket.MessageListener {
64 override fun onSocketMessage(message: String?, params: JsonElement?) {
65 activity!!.runOnUiThread {
66 presenter?.fetchAndDisplayTopics()
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/messaging/src/main/java/com/sharecare/realgreen/messaging/screens/topics/CoachingTopicsListFragment.kt:159:9Line detected, which is longer than the defined maximum line length in the code style.
156 private const val KEY_FROM_ADVOCACY_MESSAGE_CENTER = "key_from_advocacy_message_center"
157
158 @JvmStatic
159 fun makeInstance(sponsor: Sponsor, fromNotification: Boolean, sponsorSkipped: Boolean = false, fromAdvocacyMessageCenter: Boolean = false): Fragment {
160 return CoachingTopicsListFragment().apply {
161 arguments = Bundle().apply {
162 putBoolean(KEY_FROM_NOTIFICATION, fromNotification)
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/messaging/src/main/java/com/sharecare/realgreen/messaging/screens/topics/TopicsAdapter.kt:13:1Line detected, which is longer than the defined maximum line length in the code style.
10 import com.sharecare.realgreen.messaging.R
11 import com.sharecare.realgreen.messaging.databinding.MessagingItemChannelBinding
12
13 class TopicsAdapter(itemClickListener: ItemClickListener<TopicDto>, items: List<TopicDto>) : FixedListAdapter<TopicDto, BindableViewHolder<TopicDto>>(items) {
14
15 init {
16 this.listener = itemClickListener
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/messaging/src/main/java/com/sharecare/realgreen/messaging/screens/topics/TopicsPresenter.kt:14:1Line detected, which is longer than the defined maximum line length in the code style.
11 import com.sharecare.realgreen.messaging.util.toOfflineTopic
12 import javax.inject.Inject
13
14 class TopicsPresenter @Inject constructor(private val coachingHomeRepository: CoachingHomeRepository, private val sourceWriter: OfflineSourceWriter,
15 private var offlineSourceReader: OfflineSourceReader) : BasePresenter<TopicsView>() {
16 var sponsor: Sponsor? = null
17 var navigate = true
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/messaging/src/main/java/com/sharecare/realgreen/messaging/screens/topics/TopicsPresenter.kt:15:43Line detected, which is longer than the defined maximum line length in the code style.
12 import javax.inject.Inject
13
14 class TopicsPresenter @Inject constructor(private val coachingHomeRepository: CoachingHomeRepository, private val sourceWriter: OfflineSourceWriter,
15 private var offlineSourceReader: OfflineSourceReader) : BasePresenter<TopicsView>() {
16 var sponsor: Sponsor? = null
17 var navigate = true
18 var mIsFromNotification = false
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/messaging/src/main/java/com/sharecare/realgreen/messaging/util/MessagingAnalytics.kt:70:21Line detected, which is longer than the defined maximum line length in the code style.
67
68 fun onMessageCardClick(sponsor: String, topic: String, attachment: AttachmentsDAO) =
69 action(ACTION_CHAT_CLICK_CARD, sponsor, topic)
70 .customParam(RG_CARD_TYPE, attachment.type.run { get(0).toUpperCase().plus(substring(1).toLowerCase()) })
71 .customParam(RG_CARD_DETAILS, attachment.title ?: "")
72 .customParam(RG_CONTENT_ID, attachment.contentId)
73
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/messaging/src/test/java/com/sharecare/realgreen/messaging/screens/messages/MessagesPresenterTest.kt:40:9Line detected, which is longer than the defined maximum line length in the code style.
37 analytics = mock(MessagingAnalytics::class.java)
38 notificationDisplayer = mock(MessagingNotificationDisplayer::class.java)
39
40 messagesPresenter = MessagesPresenter("MockTopic", Sponsor("MockSponsor", null, "Mock Sponsor"), chatManager, notificationDisplayer)
41
42
43 topic = TopicDao("MockSponsor", "MockTopic")
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/models/src/main/java/com/sharecare/models/Ticket.kt:20:5Line detected, which is longer than the defined maximum line length in the code style.
17 @SerializedName("password_expires") var expirationInstant: Long = 0,
18 ){
19 fun requiresMfa(): Boolean = !mfaToken.isNullOrBlank() && !requiresRecovery()
20 fun requiresRecovery() = !mfaToken.isNullOrBlank() && mfaEmail.isNullOrBlank() && mfaCall.isNullOrBlank() && mfaSms.isNullOrBlank()
21 }
22
23 enum class PasswordChangeReasonType(val serverName: String) {
- C:/Users/UMANG PATEL/AndroidStudioProjects/sharecare/feingoldtech-android-sharecare/models/src/main/java/com/sharecare/models/onboarding/PageSubmissionModel.kt:7:1Line detected, which is longer than the defined maximum line length in the code style.
4 import java.io.Serializable
5
6 @Keep
7 data class PageSubmissionModel(val id: String, val values: MutableList<SubmissionField> = mutableListOf(), val skip: Boolean? = null) : Serializable {
8
9 fun addField(fieldId: String, value: Any) {
10 values.add(SubmissionField(fieldId, value))